mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-06-01 13:40:54 +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
|
||||
location /cookiecloud {
|
||||
proxy_pass http://backend_api;
|
||||
rewrite ^.+mock-server/?(.*)$ /$1 break;
|
||||
rewrite ^.+mock-server/?(?<suffix>.*)$ /$suffix break;
|
||||
proxy_http_version 1.1;
|
||||
proxy_buffering off;
|
||||
proxy_cache off;
|
||||
@@ -54,7 +54,7 @@ location ~ ^/api/v1/system/(message|progress/) {
|
||||
# API代理配置
|
||||
location /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_buffering off;
|
||||
proxy_cache off;
|
||||
@@ -104,4 +104,4 @@ location /api/v1/site/icon/ {
|
||||
|
||||
# 向后端API转发请求
|
||||
proxy_pass http://backend_api;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user