mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
fix: mitigate CVE-2026-42945 by using named captures in rewrite (#5769)
This commit is contained in:
@@ -12,7 +12,7 @@ location / {
|
|||||||
# 本地CookieCloud
|
# 本地CookieCloud
|
||||||
location /cookiecloud {
|
location /cookiecloud {
|
||||||
proxy_pass http://backend_api;
|
proxy_pass http://backend_api;
|
||||||
rewrite ^.+mock-server/?(.*)$ /$1 break;
|
rewrite ^.+mock-server/?(?<suffix>.*)$ /$suffix break;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
proxy_cache off;
|
proxy_cache off;
|
||||||
@@ -54,7 +54,7 @@ location ~ ^/api/v1/system/(message|progress/) {
|
|||||||
# API代理配置
|
# API代理配置
|
||||||
location /api {
|
location /api {
|
||||||
proxy_pass http://backend_api;
|
proxy_pass http://backend_api;
|
||||||
rewrite ^.+mock-server/?(.*)$ /$1 break;
|
rewrite ^.+mock-server/?(?<api_path>.*)$ /$api_path break;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
proxy_cache off;
|
proxy_cache off;
|
||||||
|
|||||||
Reference in New Issue
Block a user