From b392f26743ff6abe5163de78ef04002b328b8e79 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 21 八月 2024 15:04:34 +0800 Subject: [PATCH] 1 --- docker-compose/nginx/conf/nginx.conf | 26 +++++++++++++++++--------- 1 files changed, 17 insertions(+), 9 deletions(-) diff --git a/docker-compose/nginx/conf/nginx.conf b/docker-compose/nginx/conf/nginx.conf index 8243d3c..e3efd20 100644 --- a/docker-compose/nginx/conf/nginx.conf +++ b/docker-compose/nginx/conf/nginx.conf @@ -19,21 +19,29 @@ try_files $uri $uri/ /index.html; index index.html index.htm; } - + + location /sso { + alias /usr/share/nginx/html/sso; + try_files $uri $uri/ /sso/; + #index index.html index.htm; + } + + location /sys { + alias /usr/share/nginx/html/sys; + try_files $uri $uri/ /sys/; + #index index.html index.htm; + } + location /prod-api/ { - #add_header Access-Control-Allow-Origin $http_origin always; -聽 聽 聽 聽 聽 聽 #add_header Access-Control-Allow-Credentials true always; -聽 聽 聽 聽 聽 聽 #add_header Access-Control-Allow-Methods 'GET,POST,PUT,DELETE,OPTIONS' always; -聽 聽 聽 聽 聽 聽 #add_header Access-Control-Allow-Headers 'Authorization,X-Requested-With,Content-Type,Origin,Accept' always; -聽 聽 聽 聽 聽 聽 proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; - proxy_set_header REMOTE-HOST $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header REMOTE-HOST $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://se-gateway:8080/; } - # 閬垮厤actuator鏆撮湶 + # actuator if ($request_uri ~ "/actuator") { return 403; } -- Gitblit v1.9.3