You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently started using contrib/static but discovered the second paramter called "indexes" behaves a little differently to me and I am wondering if it's a bug.
With indexes set to false it won't give directory listings as expected, but it also won't automatically serve up index.html if you go to /static/ for example and there is an index.html file there.
I think this is a bug.
With indexes set to true it serves up directory listings AND going to /static/ automatically opens index.html
I think it's not right that the indexes flag controls both directory listing AND whether index.html should be loaded automatically, it seems like a bug to me and this needs to be a second argument really.
When visiting
/static/
on a webserver that uses https://github.com/gin-gonic/contrib/blob/master/static/static.go to handle requests to/static/*
, I see a file listing. For security purposes, I would like to disable this.Any thoughts on how to securely do this? Thanks!
/cc @ajvb
The text was updated successfully, but these errors were encountered: