Explorar el Código

更新 'server/controller/auth.js'

WangHongKai hace 5 años
padre
commit
e9fe4d4b3b
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      server/controller/auth.js

+ 1 - 1
server/controller/auth.js

@@ -21,7 +21,7 @@ class AuthController{
             let durl=/http:\/\/([^\/]+)\//i;
             let domain = redirect_uri.match(durl)[1];
             // console.log('domain',domain);
-            if(allowed_redirect_domains.indexOf(domain) < 0){
+            if(allowed_redirect_domains.filter(item => domain.indexOf(domain) >= 0).length){
                 ctx.body=Response.failed("非法请求,拒绝访问");
             }else{
               ctx.cookies.set('redirect_uri', redirect_uri, {