Selaa lähdekoodia

fix: 用^~前缀确保auth/callback优先于正则匹配

nginx正则匹配优先级高于普通前缀匹配,
添加^~使/auth/callback不被代理到后端
kinglee 1 viikko sitten
vanhempi
sitoutus
2f7ef2d2a0
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      nginx.conf.template

+ 2 - 2
nginx.conf.template

@@ -7,8 +7,8 @@ server {
         try_files $uri $uri/ /index.html;
     }
 
-    # SSO 回调页面由前端 SPA 处理,不代理到后端
-    location /auth/callback {
+    # SSO 回调页面由前端 SPA 处理,^~ 确保优先于下面的正则匹配
+    location ^~ /auth/callback {
         try_files $uri /index.html;
     }