8 months ago
On the legacy proxy, requests correctly returned the gzipped response when browsers send the Accept-Encoding: gzip, deflate, br
header. However, this does not work on the new proxy. It appears that the Accept-Encoding
header is stripped before reaching my server.
8 Replies
8 months ago
+1 for adding back support for compression. This is an important feature for user performance and SEO.
8 months ago
Hey Greg and thank you so much for calling this out!
Mig, one of our infrastructure team members is aware and will be looking into not stripping those headers
Status changed to Awaiting User Response railway[bot] • 8 months ago
Status changed to Awaiting Railway Response railway[bot] • 8 months ago
Status changed to In Progress chandrika • 8 months ago
8 months ago
AAAAAAaaaaaaaarrrrggg, I finally understand why I'm struggling for hours!
At least my project's configuration is now ready to handle encoding
8 months ago
Hello all, we have pushed a change to our proxy, we no longer strip out that header!
https://railway.app/changelog/2024-09-06-edge-improvements#edge-network-improvements
8 months ago
AMAZING NEWS!!!! I'm impressed with the fast response and solution. I was about to migrate everything to Azure or GCP just because of that header. I'll stay in Railway now
8 months ago
Thanks for the quick turnaround
Hello all, we have pushed a change to our proxy, we no longer strip out that header!
https://railway.app/changelog/2024-09-06-edge-improvements#edge-network-improvements
The changelog mentions "we previously handled this for you," though I don't think this was true. The header was stripped and an uncompressed response was returned.
It would actually be useful if Railway compressed responses when requested with Accept-Encoding
. Cloudflare does this [0] and it's nice, since it can be a pain to do it in middleware
[0]: https://developers.cloudflare.com/speed/optimization/content/brotli/content-compression/
8 months ago
The changelog mentions "we previously handled this for you," though I don't think this was true. The header was stripped and an uncompressed response was returned.
It was supported for a short while but we ended up disabling it because of memory spikes on the proxy hosts. Wasn't the quick win we thought it would be :D
We definitely want to do this though - going to track this feedback in a separate thread here: https://help.railway.app/feedback/v2-proxy-support-compression-e4d7eee6
Status changed to Solved ray-chen • 8 months ago