any way to get compression for jsonl files

right now static jsonl files are served as application/octet-stream and as such don't get compression. any way to enable it? (i'm serving moderately large files that compress to around 1/8th of the size with gzip)
4 Replies
Erisa
Erisa11mo ago
Try changing the content type in a transform rule https://developers.cloudflare.com/rules/transform/response-header-modification/ or just at your server, to application/json
HTTP response header modification rules · Cloudflare Rules docs
You can manipulate the headers included in the HTTP response through HTTP response header modification rules. Through these rules you can:
KTibow
KTibowOP11mo ago
i think https://developers.cloudflare.com/pages/configuration/headers/ is the more relevant doc page here, but i'll try it and see what happens
Headers · Cloudflare Pages docs
To attach headers to Cloudflare Pages responses, create a _headers plain text file in the output folder of your project. It is usually the folder that …
Erisa
Erisa11mo ago
Riight yes sorry skimmed over what channel this was, try that for sure
KTibow
KTibowOP11mo ago
/scan/*
Content-Type: text/plain
/scan/*
Content-Type: text/plain
did it
Want results from more Discord servers?
Add your server