-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Filesystem middleware #1787
Comments
There is currently static middleware with the option to browse: https://echo.labstack.com/middleware/static |
Related to #1755 Currently for Echo same thing is achievable with following line if embed.FS is needed. //go:embed public/*
...
var content embed.FS
...
e.GET("/*", echo.WrapHandler(http.FileServer(http.FS(content)))) We probably should tweak static middleware so user can pass in their FS with other options. |
So I created locally branch to add support for see: golang/go#44557 and golang/go#40067 Lets wait a little |
Issue Description
It would be very nice to have a filesystem middleware supported by echo. Fiber currently has one implemented that allows much easier integration of the new go embed directive.
With fiber, integration looks like this with the middleware:
And the current way to get this working with echo looks like this:
Curious on your thoughts on this
The text was updated successfully, but these errors were encountered: