代码拉取完成,页面将自动刷新
同步操作将从 Eolink/Postcat 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
absolute_redirect off; #取消绝对路径的重定向
sendfile on;
default_type application/octet-stream;
gzip on;
gzip_http_version 1.1;
gzip_disable "MSIE [1-6]\.";
gzip_min_length 256;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_comp_level 9;
root /usr/share/nginx/html;
location / {
return 301 $scheme://$http_host/zh;
}
location /zh {
alias /usr/share/nginx/html/zh;
index index.html index.htm;
try_files $uri $uri/ /zh/index.html;
}
location /en {
alias /usr/share/nginx/html/en;
index index.html index.htm;
try_files $uri $uri/ /en/index.html;
}
# api测试服务
location /api/unit {
proxy_pass http://eoapi-test-server:$NODE_SERVER_PORT; # 转发规则
proxy_set_header Host $proxy_host; # 修改转发请求头,让3000端口的应用可以受到真实的请求
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# websocket测试服务
location ~/socket.io/(.*) {
proxy_pass http://eoapi-test-server:$EOAPI_WEBSOCKET_POST; # 转发规则
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_redirect off;
}
# 后端服务
location ^~ /api {
proxy_pass http://eoapi-remote-server:$EOAPI_SERVER_PORT; # 转发规则
proxy_set_header Host $proxy_host; # 修改转发请求头,让3000端口的应用可以受到真实的请求
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# 后端服务兼容旧客户端
location ~ ^/(system|workspace|user|auth|mock|[0-9]+/[0-9]+/api_data|[0-9]+/[0-9]+/group|[0-9]+/[0-9]+/group|[0-9]+/[0-9]+/environment|[0-9]+/[0-9]+/api_test_history|[0-9]+/[0-9]+/mock|[0-9]+/[0-9]+/shared|[0-9]+/project) {
proxy_pass http://eoapi-remote-server:$EOAPI_SERVER_PORT; # 转发规则
proxy_set_header Host $proxy_host; # 修改转发请求头,让3000端口的应用可以受到真实的请求
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
rewrite "^/(.*)$" /api/$1 break;
}
# location ^~ /zh/(.*)/assets/(.*)$ {
# alias /usr/share/nginx/html/zh/assets/$2;
# return 501 /usr/share/nginx/html/zh/assets/$2;
#}
# location ^~ /zh/\.(gif|jpg|jpeg|png|css|js|ico|svg|ttf|woff2|woff|txt)$ {
# alias /usr/share/nginx/html/zh/$1;
# return 502 /usr/share/nginx/html/zh/$1;
#}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。