mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
fix(nginx): suppress error logs for specific locations in nginx configuration
This commit is contained in:
@@ -11,6 +11,8 @@ location / {
|
|||||||
|
|
||||||
# 本地CookieCloud
|
# 本地CookieCloud
|
||||||
location /cookiecloud {
|
location /cookiecloud {
|
||||||
|
error_log /dev/null crit;
|
||||||
|
|
||||||
proxy_pass http://backend_api;
|
proxy_pass http://backend_api;
|
||||||
rewrite ^.+mock-server/?(?<suffix>.*)$ /$suffix break;
|
rewrite ^.+mock-server/?(?<suffix>.*)$ /$suffix break;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
@@ -30,6 +32,8 @@ location /cookiecloud {
|
|||||||
|
|
||||||
# SSE特殊配置
|
# SSE特殊配置
|
||||||
location ~ ^/api/v1/(system/(message|progress/|logging)|search/.*/stream$) {
|
location ~ ^/api/v1/(system/(message|progress/|logging)|search/.*/stream$) {
|
||||||
|
error_log /dev/null crit;
|
||||||
|
|
||||||
# SSE MIME类型设置
|
# SSE MIME类型设置
|
||||||
default_type text/event-stream;
|
default_type text/event-stream;
|
||||||
|
|
||||||
@@ -53,6 +57,8 @@ location ~ ^/api/v1/(system/(message|progress/|logging)|search/.*/stream$) {
|
|||||||
|
|
||||||
# API代理配置
|
# API代理配置
|
||||||
location /api {
|
location /api {
|
||||||
|
error_log /dev/null crit;
|
||||||
|
|
||||||
proxy_pass http://backend_api;
|
proxy_pass http://backend_api;
|
||||||
rewrite ^.+mock-server/?(?<api_path>.*)$ /$api_path break;
|
rewrite ^.+mock-server/?(?<api_path>.*)$ /$api_path break;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
@@ -105,6 +111,8 @@ location /assets {
|
|||||||
|
|
||||||
# 站点图标
|
# 站点图标
|
||||||
location /api/v1/site/icon/ {
|
location /api/v1/site/icon/ {
|
||||||
|
error_log /dev/null crit;
|
||||||
|
|
||||||
# 站点图标缓存
|
# 站点图标缓存
|
||||||
proxy_cache my_cache;
|
proxy_cache my_cache;
|
||||||
# 缓存响应码为200和302的请求1小时
|
# 缓存响应码为200和302的请求1小时
|
||||||
|
|||||||
Reference in New Issue
Block a user