fix(docker): ensure docs llms text files use UTF-8 charset (#9020)

This commit is contained in:
PiEgg
2026-04-01 22:44:23 +08:00
committed by GitHub
parent 1bc3db684d
commit 06b67d44f6
+16
View File
@@ -51,6 +51,22 @@ server {
etag off;
}
# 专门针对 txt 文件的路由
location ~ \.txt$ {
root /app/nocobase/docs;
# 清空默认的 types 映射,强制指定带有 charset 的 Content-Type
types { }
default_type "text/plain; charset=utf-8";
# 保持原有的头部控制逻辑
add_header Last-Modified $date_gmt;
add_header Cache-Control 'no-store, no-cache';
if_modified_since off;
expires off;
etag off;
}
location / {
root /app/nocobase/docs;
try_files $uri $uri.html $uri/index.html /index.html;