feat(archive-service): 新增敏感词风控相关实体与Mapper feat(archive-service): 新增会话统计相关VO类 refactor(archive-service): 移除ArchiveMessage的deleted逻辑字段 fix: 修正数据库连接字符集配置为UTF-8 style(frontend): 优化nginx缓存配置规则 refactor(conversation-service): 替换var为显式类型声明
34 lines
892 B
Nginx Configuration File
34 lines
892 B
Nginx Configuration File
server {
|
||
listen 80;
|
||
server_name localhost;
|
||
root /usr/share/nginx/html;
|
||
index index.html;
|
||
|
||
# API 代理到 Gateway
|
||
location /api/ {
|
||
proxy_pass http://gateway:8080;
|
||
proxy_set_header Host $host;
|
||
proxy_set_header X-Real-IP $remote_addr;
|
||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||
}
|
||
|
||
# HTML 文件禁用缓存
|
||
location ~* \.html$ {
|
||
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
||
add_header Pragma "no-cache";
|
||
add_header Expires "0";
|
||
try_files $uri $uri/ /index.html;
|
||
}
|
||
|
||
# 静态资源
|
||
location / {
|
||
try_files $uri $uri/ /index.html;
|
||
}
|
||
|
||
# 缓存静态资源(JS/CSS/图片等)
|
||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||
expires 1d;
|
||
add_header Cache-Control "public, immutable";
|
||
}
|
||
}
|