diff --git a/nginx.conf b/nginx.conf index 5c91b9f..8aadf3f 100644 --- a/nginx.conf +++ b/nginx.conf @@ -38,6 +38,19 @@ http { proxy_set_header Authorization $http_authorization; proxy_pass http://localhost:33333/file/; } + # ============================================ + # 文件服务接口 (/file/*) + # ============================================ + location /api/file/ { + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Port $server_port; + proxy_set_header Authorization $http_authorization; + proxy_pass http://localhost:33333/file/; + } # ============================================ # Story 相关接口 (/api/story/*)