-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
🚀 v3 Request: Merge static
and filesystem
middleware as static
middleware
#2031
Comments
How to deal with |
embed.FS is compatible with fs.FS (io/fs) interfaces. So it can be used without extra effort. So it'll be easier to use fs interfaces with #2027 Fasthttp FS is not well with fs interfaces but it may be improved in the future. valyala/fasthttp#1374 Perhaps we can remove filesystem middleware in v3 cuz of there will no pros over fasthttp FS after this improvement. |
Got it. |
how to suppport Compress option? app.Static("/", "web", fiber.Static{
Compress: true, // <---- HERE
ByteRange: true,
}) |
Probably we will remove filesystem middleware after fasthttp FS gets Don't have much knowledge about PR at the moment. Not reviewed yet |
The implementation of this patch is far off! |
Update, fs.FS support seems to be in fasthttp now. |
Will work on it |
Feature Description
I think we should merge static and filesystem to make Fiber core simple in v3. Also there's no performance problem when we compare fasthttp.FS static and io/fs filesystem middleware. (#2027)
Additional Context (optional)
Code Snippet (optional)
Checklist:
The text was updated successfully, but these errors were encountered: