podsync icon indicating copy to clipboard operation
podsync copied to clipboard

Avoid folder indexing

Open arikb opened this issue 5 years ago • 2 comments

I would like to avoid scraping of my server by (optionally) eliminating the indexing of files from the root directory.

Current behaviour: GET / returns a page containing an index comprised of podcast folders and feeds. GET /podcastID returns a page containing a list of MP3s

Requested behavioue: GET / returns 404; GET /podcastID returns 404

arikb avatar Nov 22 '19 22:11 arikb

FWIW, I just dropped a blank index.html file in the data directory and that hid the directory listings. Doesn't help if you know the podcast id, but you could presumably do the same in each feed's directory.

tithonium avatar Dec 03 '19 04:12 tithonium

My setup is the following, restricted to HTTPS using a LetsEncrypt certificate managed and maintained automatically by certbot:

server {
	listen 80;
	server_name cast.example.com;
	
	location / {
		index index.rss;
		root /Volumes/Drobo/Multimedia/YouTube;
	}
}

Only considers delivering "index.rss" files, if present, as the "default page" for a requested bare folder. (E.g. subscribe to cast.example.com/Uploads_from_Test_User within Podcasts.app.) This results in a 404 at the root level; no automatic directory listing is produced by Nginx by default, and keeps podcast subscription links to the domain and singular level of directory for the channel/playlist. (Omitted autoindex directive.)

amcgregor avatar Dec 03 '19 18:12 amcgregor