agent_9art/frontend/admin/nginx.conf
jiao 6160691aa9 build: 调整项目Java版本为1.8
feat(archive-service): 新增敏感词风控相关实体与Mapper
feat(archive-service): 新增会话统计相关VO类
refactor(archive-service): 移除ArchiveMessage的deleted逻辑字段
fix: 修正数据库连接字符集配置为UTF-8
style(frontend): 优化nginx缓存配置规则
refactor(conversation-service): 替换var为显式类型声明
2026-05-29 15:46:55 +08:00

34 lines
892 B
Nginx Configuration File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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";
}
}