Revert "nginx: disable gzip for SSE endpoints"
This reverts commit 51d1efead6.
This doesn't work. What we want is something like:
map $sent_http_content_type $buffering {
default "on"; # Enable buffering by default
"text/event-stream" "off"; # Disable buffering for SSE responses
}
proxy_buffering $buffering;
unfortunately, proxy_buffering does not support variables.
https://mailman.nginx.org/pipermail/nginx/2023-November/ZGQLNBVQEG5KNLH55HTR4R4NFODBSIU3.html
Upstream has to possibly to X-Accel-Buffering to 'no' . Otherwise, we have to ship
nginx in the package.
This commit is contained in:
@@ -131,11 +131,8 @@ server {
|
||||
gzip_min_length 18k;
|
||||
gzip_types text/css text/javascript text/xml text/plain application/javascript application/x-javascript application/json;
|
||||
|
||||
# compression chunking logic will interfere with SSE packet flushing
|
||||
gzip_disable "text/event-stream";
|
||||
|
||||
# what responses are proxied
|
||||
gzip_proxied no-cache no-store private expired auth;
|
||||
# enable for proxied requests as well
|
||||
gzip_proxied any;
|
||||
|
||||
<% if ( endpoint === 'dashboard' || endpoint === 'ip' || endpoint === 'setup' ) { -%>
|
||||
# CSP headers for the dashboard resources
|
||||
|
||||
Reference in New Issue
Block a user