goStatic icon indicating copy to clipboard operation
goStatic copied to clipboard

Add `enable-directory-listings` flag

Open aaronjamt opened this issue 1 year ago • 1 comments

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

aaronjamt avatar Nov 23 '23 09:11 aaronjamt

@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.

JesseKlaasse avatar Aug 12 '24 06:08 JesseKlaasse