azukaar / Cosmos-Server

☁️ The Most Secure and Easy Selfhosted Home Server. Take control of your data and privacy without sacrificing security and stability (Authentication, anti-DDOS, anti-bot)
https://cosmos-cloud.io
Other
3.65k stars 130 forks source link

[FEAT]: Gzip support for static routes #282

Closed brezinajn closed 4 months ago

brezinajn commented 4 months ago

Feature Description

I have file something.json.gz and I'd like to be able to serve it statically from /something.json with Content-Encoding: gzip. Current behavior: /something.json route returns 404 since there is no something.json file present

Alternative solutions: Use nginx ☹️

azukaar commented 4 months ago

The header is not present but AFAIK the zipping is still happening if you request files, you can see it when you use speedtest tools for example. Happy to be be proven otherwise thought