Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ server {
# ── Compression ───────────────────────────────────────────────────────────
gzip on;
gzip_vary on;
gzip_proxied any;
# "off" prevents nginx from gzip-encoding responses to proxies/gateways that
# already sent Accept-Encoding upstream. FragmentGateway decompresses server-side
# but can leak Content-Encoding header to the browser causing ERR_CONTENT_DECODING_FAILED.
gzip_proxied off;
gzip_comp_level 6;
gzip_types
text/css
Expand Down Expand Up @@ -66,6 +69,10 @@ server {
# Strip the /knowledge-base/ prefix so files resolve from the dist root.
location ^~ /knowledge-base/ {
rewrite ^/knowledge-base/(.*)$ /$1 break;
# Tell any intermediate proxy (e.g. web-fragments FragmentGateway) not to
# transcode/re-encode this response. Prevents Content-Encoding header
# leakage when the gateway auto-decompresses but still forwards the header.
add_header Cache-Control "no-transform" always;
try_files $uri $uri/index.html =404;
}

Expand Down
Loading