Update nginx.conf

Another issue solved by AI?
This commit is contained in:
Trance-0
2025-11-10 14:59:11 -06:00
parent 7cf48b98ae
commit 2d16f19411

View File

@@ -20,7 +20,7 @@ http {
}
# Decide where to send /_pagefind* based on the page that made the request
map $http_referer $pagefind_upstream {
map $http_referer $load_upstream {
default http://notenextra-cse;
~*://[^/]+/Math(?:/|$) http://notenextra-math;
~*://[^/]+/CSE(?:/|$) http://notenextra-cse;
@@ -56,10 +56,10 @@ http {
access_log off;
}
# Send all Pagefind assets (/_pagefind.js and /_pagefind/*) to the chosen app
# Send all next or additional assets (/_pagefind.js and /_pagefind/*) to the chosen app
# ^~ /_pagefind matches both "/_pagefind.js" and "/_pagefind/..."
location ^~ /_pagefind {
proxy_pass $pagefind_upstream; # leaves URI intact (/_pagefind.js, /_pagefind/manifest.json, etc.)
location ^~ /_(.*)$ {
proxy_pass $load_upstream; # leaves URI intact (/_pagefind.js, /_pagefind/manifest.json, etc.)
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;