Ai
1 Star 0 Fork 0

OpenMerge/openmerge-console

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
nginx.conf 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
zhaohui 提交于 2025-03-09 18:53 +08:00 . 增加keycloak身份验证
server {
listen 80;
server_name localhost;
# 静态文件根目录
root /usr/share/nginx/html;
index index.html index.htm;
# 禁用所有缓存
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires 0;
# SPA 路由支持
location / {
try_files $uri $uri/ /index.html;
}
# API 请求代理(如果需要)
location /api/ {
proxy_pass http://om-auth:2515/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
# 静态资源缓存设置
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires 0;
}
# HTML 文件不缓存
location ~* \.html$ {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires 0;
}
# 错误页面
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/openmerge/openmerge-console.git
git@gitee.com:openmerge/openmerge-console.git
openmerge
openmerge-console
openmerge-console
master

搜索帮助