You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am having trouble figuring out how to configure Nginx to always prefer Brotli over Gzip.
For example, if the request(Accept-Encoding: gzip, deflate, br) is sent to Nginx, and the reverse proxies location handles compression in gzip, how do I tell Nginx to gunzip content and compress with brotli?
In the case above, all responses will result in gzip compression. However, if the backend does not perform gzip compression, then the response to the original caller would be in br.
Appreciate any help on this matter. Thanks!
The text was updated successfully, but these errors were encountered:
Oh I figured out a way to do this, via proxying through 3 layers. Starting from the third (last layer), it makes the request to the origin with compressing with gzip, then flows back upstream (layer 2) to gunzip, and finally back to layer one to compress with Brotli.
This seems like a hack... so I'll leave this issue open for anyone to tell me how the following code violates the geneva conventions. Please let me know if there's better alternatives.
Hello, I am having trouble figuring out how to configure Nginx to always prefer Brotli over Gzip.
For example, if the request(
Accept-Encoding
:gzip, deflate, br
) is sent to Nginx, and the reverse proxies location handles compression ingzip
, how do I tell Nginx to gunzip content and compress withbrotli
?In the case above, all responses will result in
gzip
compression. However, if the backend does not performgzip
compression, then the response to the original caller would be inbr
.Appreciate any help on this matter. Thanks!
The text was updated successfully, but these errors were encountered: