代码拉取完成,页面将自动刷新
server {
listen 7070;
server_name 192.168.56.102;
# CORS配置保持不变
set $cors_origin "*";
set $cors_cred "true";
set $cors_header "authToken,Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,X-Requested-With,app,time,sign,cityos-application-code";
set $cors_method "POST, GET,OPTIONS,PATCH,PUT";
if ($http_origin ~* (.*\.urban-computing.cn)) {
set $cors_origin $http_origin;
}
if ($http_origin ~* (.*\.ops.com)) {
set $cors_origin $http_origin;
}
if ($http_origin ~* (.*\.smarts-urban.cn)) {
set $cors_origin $http_origin;
}
if ($http_origin ~* (.*\.dev.com)) {
set $cors_origin $http_origin;
}
if ($request_filename ~* .*.(html|htm)$) {
set $cache "no-cache";
}
add_header Access-Control-Allow-Origin $cors_origin always;
add_header Access-Control-Allow-Credentials $cors_cred always;
add_header Access-Control-Allow-Headers $cors_header always;
add_header Access-Control-Allow-Methods $cors_method always;
add_header Cache-Control $cache;
if ($request_method = 'OPTIONS') {
return 200;
}
location / {
alias /export/fronted/k8s-demo-fe/;
try_files $uri $uri/ /index.html;
index index.html;
}
# 静态资源缓存设置
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
alias /export/fronted/k8s-demo-fe/;
expires 1y;
add_header Cache-Control "public, no-transform";
}
# 防止访问隐藏文件
location ~ /\. {
deny all;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。