mirror of
https://github.com/nocobase/nocobase.git
synced 2026-08-29 02:03:53 +08:00
fix(docker): ensure docs llms text files use UTF-8 charset (#9020)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user