[GH-ISSUE #544] Support serving of pre-GZIP encoded files #319

Closed
opened 2026-04-08 16:52:00 +03:00 by zhus · 1 comment
Owner

Originally created by @gphg on GitHub (Feb 20, 2025).
Original GitHub issue: https://github.com/sigoden/dufs/issues/544

Specific Demand

Some files are pre-gzipped by users. How to serve these without have to decompress it?

Implement Suggestion

  • build.js.gz -> build.js
  • index.html.gz -> index.html

I can't go into the technical details, but this can be done on Apache and Nginx http server with extra configurations.

Originally created by @gphg on GitHub (Feb 20, 2025). Original GitHub issue: https://github.com/sigoden/dufs/issues/544 ## Specific Demand <!-- What feature do you need, please describe it in detail. --> Some files are pre-gzipped by users. How to serve these without have to decompress it? ## Implement Suggestion <!-- If you have any suggestion for complete this feature, you can tell us. --> * `build.js.gz` -> `build.js` * `index.html.gz` -> `index.html` I can't go into the technical details, but this can be done on Apache and Nginx http server with extra configurations.
zhus closed this issue 2026-04-08 16:52:00 +03:00
Author
Owner

@sigoden commented on GitHub (Feb 20, 2025):

We will not support this feature. While I understand the use case, dufs isn't really optimized for production environments. I'd prefer to keep it simple and focused on its core use case (quick and easy file sharing).

If you need to serve pre-gzipped files in a production setting, I highly recommend using a more robust web server like Apache or Nginx. They are designed for this kind of thing and offer more comprehensive configuration options to handle it efficiently. They can be configured to automatically serve the .gz version if the client supports gzip and the original file doesn't exist, which provides a much cleaner and more flexible solution.

<!-- gh-comment-id:2670784715 --> @sigoden commented on GitHub (Feb 20, 2025): We will not support this feature. While I understand the use case, `dufs` isn't really optimized for production environments. I'd prefer to keep it simple and focused on its core use case (quick and easy file sharing). If you need to serve pre-gzipped files in a production setting, I highly recommend using a more robust web server like Apache or Nginx. They are designed for this kind of thing and offer more comprehensive configuration options to handle it efficiently. They can be configured to automatically serve the `.gz` version if the client supports gzip and the original file doesn't exist, which provides a much cleaner and more flexible solution.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sigoden/dufs#319