feat(nginx): 添加文件服务接口的API路由配置
All checks were successful
test/timeline-frontend/pipeline/head This commit looks good
All checks were successful
test/timeline-frontend/pipeline/head This commit looks good
为/api/file/路径添加代理配置,使其能够正确转发请求到本地文件服务。保持与其他接口一致的请求头设置,确保请求信息完整传递。
This commit is contained in:
13
nginx.conf
13
nginx.conf
@@ -38,6 +38,19 @@ http {
|
|||||||
proxy_set_header Authorization $http_authorization;
|
proxy_set_header Authorization $http_authorization;
|
||||||
proxy_pass http://localhost:33333/file/;
|
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/*)
|
# Story 相关接口 (/api/story/*)
|
||||||
|
|||||||
Reference in New Issue
Block a user