mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-11-20 15:10:05 +00:00
The nested asset location replaced $uri in every statement of its copy of the advanced config with a snapshot taken before anything ran. A guard after the user's own rewrite (rewrite ^/files/alias/(.*)$ /files/private/$1; if ($uri ~ ^/files/private/) { return 403; }) then checked the old path and the protected asset was proxied. Rewrite-phase statements (set, if, rewrite, return, break, set_*) now read $uri itself (they run before the generated rewrite), and the snapshot is taken again right before the generated rewrite for the later phases. Semantics harness case /crwg/: the guarded asset gets 403 (real nginx, static and dynamic).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
74 lines
5.4 KiB
JSON
74 lines
5.4 KiB
JSON
[
|
|
{"path":"/a","fp":""},
|
|
{"path":"/b/","fp":""},
|
|
{"path":"/c","fp":"/"},
|
|
{"path":"/d/","fp":"/"},
|
|
{"path":"/e","fp":"/x"},
|
|
{"path":"/f/","fp":"/x/"},
|
|
{"path":"/g/","fp":"/x"},
|
|
{"path":"/h.v1+(p)","fp":"/y/"},
|
|
{"path":"= /exact","fp":"/z"},
|
|
{"path":"^~ /pre/","fp":"/q/"},
|
|
{"path":"~ ^/re/","fp":""},
|
|
{"path":"~* \\.php$","fp":""},
|
|
{"path":"/auth-test/","fp":"/w/","adv":"auth_request /auth;"},
|
|
{"path":"/rw/","fp":"/k/","adv":"rewrite ^/rw/old(.*)$ /rw/new$1 break;"},
|
|
{"path":"/hostpath/","host":"echo/hp","fp":""},
|
|
{"path":"/cache/","fp":"/c/","cache":true},
|
|
{"path":"/cacheroot/","fp":"","cache":true},
|
|
{"path":"/acl/","fp":"/v/","acl":true},
|
|
{"path":"\"/q p/\"","fp":"/x/"},
|
|
{"path":"\"/qc p/\"","fp":"/c/","cache":true},
|
|
{"path":"/uri/","fp":"/x/","adv":"add_header X-Sem-Uri $uri always;"},
|
|
{"path":"/curi/","fp":"/x/","cache":true,"adv":"proxy_set_header X-Sem-In $uri;"},
|
|
{"path":"/var/","host":"$sembackend","fp":"","adv":"set $sembackend echo;"},
|
|
{"path":"/varfp/","host":"$sembackend","fp":"/x/","adv":"set $sembackend echo;"},
|
|
{"path":"/varmix/","host":"ec$semhost","fp":"","adv":"set $semhost ho;"},
|
|
{"path":"/varmixfp/","host":"ec$semhost","fp":"/x/","adv":"set $semhost ho;"},
|
|
{"path":"~ ^/vmrx/","host":"ec$semhost","fp":"/v1/","adv":"set $semhost ho;"},
|
|
{"path":"/av/","fp":"/api/$arg_id"},
|
|
{"path":"/avb/","fp":"/api/${arg_id}/x"},
|
|
{"path":"/avh/","fp":"/h/$host"},
|
|
{"path":"/avr/","fp":"$request_uri"},
|
|
{"path":"/avc/","fp":"/api/$arg_id","cache":true},
|
|
{"path":"/cvt/","fp":"/v1/$semtarget","cache":true,"adv":"set $semtarget t;"},
|
|
{"path":"/cvn/","fp":"/v1/$semtarget","adv":"set $semtarget t;"},
|
|
{"path":"~ ^/rx/(.*)$","fp":"/v1/$1"},
|
|
{"path":"~* ^/rxi/(?<rest>.*)$","fp":"/v2/$rest"},
|
|
{"path":"~ ^/cachere/(.*)$","fp":"/v1/$1","cache":true},
|
|
{"path":"@fb","fp":"/fb$request_uri"},
|
|
{"path":"/cro/","fp":"/c/","cache":true,"adv":"proxy_redirect off;"},
|
|
{"path":"/tofb/","fp":"","adv":"error_page 418 = @fb; return 418;"},
|
|
{"path":"~ ^/vrx/","host":"$sembackend","fp":"/v1/","adv":"set $sembackend echo;"},
|
|
{"path":"@vfb","host":"$sembackend","fp":"/vfb/","adv":"set $sembackend echo;"},
|
|
{"path":"/tovfb/","fp":"","adv":"error_page 418 = @vfb; return 418;"},
|
|
{"path":"/api/","fp":"/api/$arg_id","cache":true},
|
|
{"path":"/cvar/","host":"$sembackend","fp":"","cache":true,"adv":"set $sembackend echo;"},
|
|
{"path":"/cvarfp/","host":"$sembackend","fp":"/x/","cache":true,"adv":"set $sembackend echo;"},
|
|
{"path":"^~ /private/","host":"$sembackend","fp":"","cache":true,"adv":"set $sembackend echo; if ($http_x_token != secret) { return 403; }"},
|
|
{"path":"^~ /nprivate/","host":"$sembackend","fp":"","adv":"set $sembackend echo; if ($http_x_token != secret) { return 403; }"},
|
|
{"path":"/crw/","fp":"/k/","cache":true,"adv":"rewrite ^/crw/old/(.*)$ /crw/new/$1 break;"},
|
|
{"path":"^~ /crwg/","fp":"/v1/","cache":true,"adv":"rewrite ^/crwg/alias/(.*)$ /crwg/private/$1; if ($uri ~ ^/crwg/private/) { return 403; } proxy_set_header X-Sem-In $uri;"},
|
|
{"path":"/cif/","fp":"/v1/$semt","cache":true,"adv":"set $semt a; if ($arg_b) { set $semt b; }"},
|
|
{"path":"/cnest/","fp":"/n/","cache":true,"adv":"location /cnest/in/ { return 200 \"inner $uri\"; }"},
|
|
{"path":"/nest/","fp":"/n/","adv":"location /nest/in/ { return 200 \"inner $uri\"; }"},
|
|
{"path":"/cacl/","fp":"/v/","cache":true,"acl":true},
|
|
{"path":"/cinc/","fp":"/i/","cache":true,"adv":"include /tmp/nginx-sem/snip/proxy.conf; include /tmp/nginx-sem/snip/auth.conf; if ($http_x_ok = deny) { return 403; }"},
|
|
{"path":"^~ /cincg/","host":"$sembackend","fp":"","cache":true,"adv":"set $sembackend echo; include /tmp/nginx-sem/snip/guard.conf;"},
|
|
{"path":"/clua/","fp":"","cache":true,"adv":"include /tmp/nginx-sem/snip/hdr.conf; set_by_lua_block $sembad { if ngx.var.http_x_token ~= \"secret\" then return \"1\" end return \"\" } if ($sembad) { return 403; }"},
|
|
{"path":"/csm/","fp":"","cache":true,"adv":"include /tmp/nginx-sem/snip/hdr.conf; set_if_empty $semtok $http_x_token; set_if_empty $semtok none; if ($semtok != secret) { return 403; }"},
|
|
{"path":"/cstore/","fp":"/s/","cache":true,"adv":"proxy_store /tmp/nginx-sem-store$uri;"},
|
|
{"path":"/cstorei/","fp":"/s/","cache":true,"adv":"include /tmp/nginx-sem/snip/hdr.conf; proxy_store on; root /tmp/nginx-sem-store;"},
|
|
{"path":"/cluab/","fp":"/l/","cache":true,"adv":"access_by_lua_block {\n -- deny unless the token is right }\n local t = {1} if #t ~= 1 or ngx.var.http_x_token ~= \"secret\" then return ngx.exit(403) end\n}\nproxy_set_header X-Sem-In lua;"},
|
|
{"path":"/cluabi/","fp":"/l/","cache":true,"adv":"include /tmp/nginx-sem/snip/hdr.conf;\naccess_by_lua_block {\n -- deny unless the token is right }\n local t = {1} if #t ~= 1 or ngx.var.http_x_token ~= \"secret\" then return ngx.exit(403) end\n}"},
|
|
{"path":"/credi/","fp":"/r/","cache":true,"adv":"include /tmp/nginx-sem/snip/redir.conf;"},
|
|
{"path":"/cref/","fp":"","cache":true,"adv":"include /tmp/nginx-sem/snip/ref.conf;\nvalid_referers *.example.com;\nif ($invalid_referer) { return 403; }"},
|
|
{"path":"/rdoi/","fp":"/o/","adv":"include /tmp/nginx-sem/snip/rdoff.conf;"},
|
|
{"path":"/rdgi/","fp":"/g/","adv":"include /tmp/nginx-sem/snip/rdnest[.]conf;"},
|
|
{"path":"/rdvi/","fp":"/v/","adv":"include /tmp/nginx-sem/snip/rdother.conf;"},
|
|
{"path":"/crdoi/","fp":"/c/","cache":true,"adv":"include /tmp/nginx-sem/snip/rdoff.conf;"},
|
|
{"path":"/bs\\.x/","fp":"/x/"},
|
|
{"path":"/bb\\\\x/","fp":"/x/"},
|
|
{"path":"\"/qe\\\"x/\"","fp":"/x/"},
|
|
{"path":"^~ /pe\\;x/","fp":"/x/"}
|
|
]
|