mirror of
https://github.com/penpot/penpot.git
synced 2026-11-15 22:54:45 +00:00
The Admin Console location built its proxy_pass target from a capture of $request_uri, which nginx escapes again when the path has escaped characters: %XX became %25XX and the query string ended up in the path, so Admin Console links returned 404. Strip the prefix with a rewrite and let proxy_pass forward the rewritten URI instead. AI-assisted-by: Claude Signed-off-by: David Barragán Merino <david.barragan@kaleidos.net>
12 lines
457 B
Plaintext
12 lines
457 B
Plaintext
# The Admin Console is served at the root of its own server. Keep proxy_pass
|
|
# without a URI: building it from $request_uri escapes the path twice.
|
|
location /admin-console {
|
|
rewrite "^/admin-console(?:/(.*))?$" /$1 break;
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $http_host;
|
|
proxy_set_header X-Real-IP $http_cf_connecting_ip;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_pass $PENPOT_ADMIN_CONSOLE_URI;
|
|
}
|