代码拉取完成,页面将自动刷新
server {
listen 80;
listen [::]:80;
server_name _;
gzip on;
gzip_min_length 1k;
gzip_comp_level 9;
gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml;
gzip_vary on;
gzip_disable "MSIE [1-6]\.";
resolver $NAMESERVERS ipv6=off;
root /usr/share/nginx/html;
include /etc/nginx/mime.types;
set $my_result_code 200;
set $my_server_name {SERVER_NAME};
if ($http_Host !~* ^{SERVER_NAME}) {
set $my_result_code 403;
}
if ($my_server_name ~ "0") {
set $my_result_code 200;
}
if ($my_result_code = 403) {
return 403;
}
location / {
index index.html;
}
location ^~/api/ {
if ($request_uri ~* ^/api/(.*)$) {
proxy_pass {API_BASE_PATH}$1;
}
#proxy_pass http://host.docker.internal:8840/;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_connect_timeout 1;
proxy_buffering off;
chunked_transfer_encoding off;
proxy_cache off;
proxy_send_timeout 30m;
proxy_read_timeout 30m;
client_max_body_size 500m;
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。