Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

refactor: improve Nginx configuration for file handling

wizardchende6e0783b7a2
diff --git a/frontend/nginx.conf b/frontend/nginx.conf
index 1349d0d88..ad114732a 100644
--- a/frontend/nginx.conf
+++ b/frontend/nginx.conf
@@ -22,8 +22,9 @@ server {
}
# 本地存储文件代理到后端服务(用于渲染 markdown 中的图片)
- location /files/ {
- proxy_pass ${APP_SCHEME}://${APP_HOST}:${APP_PORT}/files/;
+ # 精确匹配 /files,避免 Nginx 自动补 / 触发 301
+ location = /files {
+ proxy_pass ${APP_SCHEME}://${APP_HOST}:${APP_PORT}/files;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;