podsync
podsync copied to clipboard
Avoid folder indexing
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
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.
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.)