From 823b200bc7c92e07a8afeab09e3aa15eb8ee918e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=93=E6=A0=8B=E6=A2=81?= Date: Sun, 29 Jun 2025 17:11:03 +0800 Subject: [PATCH] changes --- nginx.conf.gateway | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/nginx.conf.gateway b/nginx.conf.gateway index 10d1db8..23e2f8a 100644 --- a/nginx.conf.gateway +++ b/nginx.conf.gateway @@ -123,6 +123,17 @@ http { proxy_redirect https://sys_api/ http://$host:$server_port/auth/; } + location = /auth/.well-known/openid-configuration { + proxy_pass https://sys_api/.well-known/openid-configuration; + + # 动态修改返回的JSON中的URL + proxy_set_header Accept-Encoding ""; + sub_filter_types application/json; + sub_filter_once off; + sub_filter '"issuer":"' '"issuer":"https://$host:8001"'; + sub_filter 'https://sys-api:19902' 'https://$host:8001'; + sub_filter 'https://sys_api' 'https://$host:8001'; + } # UI前端路由 location / { proxy_pass http://sys_ui; @@ -175,7 +186,17 @@ http { proxy_redirect https://sys_api:19902/ http://$host:$server_port/auth/; proxy_redirect https://sys_api/ http://$host:$server_port/auth/; } - + location = /auth/.well-known/openid-configuration { + proxy_pass https://sys_api/.well-known/openid-configuration; + + # 动态修改返回的JSON中的URL + proxy_set_header Accept-Encoding ""; + sub_filter_types application/json; + sub_filter_once off; + sub_filter '"issuer":"' '"issuer":"https://$host:8001"'; + sub_filter 'https://sys-api:19902' 'https://$host:8001'; + sub_filter 'https://sys_api' 'https://$host:8001'; + } location /api/sys/ { proxy_pass https://sys_api/api/; proxy_ssl_server_name on;