11 Star 95 Fork 180

JetLinks物联网基础平台/jetlinks-ui-vue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
nginx.conf 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
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;
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jetlinks/jetlinks-ui-vue.git
[email protected]:jetlinks/jetlinks-ui-vue.git
jetlinks
jetlinks-ui-vue
jetlinks-ui-vue
master

搜索帮助