goStatic
goStatic copied to clipboard
Add `enable-directory-listings` flag
This controls what happens when someone tries to request a path which is just a directory (not a file): When true (default), responds with a browsable directory listing (current behavior) When false, responds with the same 404 page as is provided when attempting to access a nonexistant file This prevents someone from browsing all of your static files by simply walking through the directory tree
@PierreZ Any chances that this PR will be merged? For my project, I need the directory listing to be disabled. I could use the fallback page workaround, but that's not really what I want.