Parcourir la source

#1473 Module OAuth2 Server: To add support for Cross-Origin Resource Sharing (CORS)

Alex Trofimov il y a 8 ans
Parent
commit
b7b231c565
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      modules/boonex/oauth2/classes/BxOAuthModule.php

+ 1 - 1
modules/boonex/oauth2/classes/BxOAuthModule.php

@@ -83,7 +83,7 @@ class BxOAuthModule extends BxDolModule
 
         if (!empty($aClient['cors']) && isset($_SERVER['HTTP_ORIGIN'])) {
             
-            if ('*' == trim($aClient['cors']) || ($a = explode(',', $aClient['cors']) && in_array($_SERVER['HTTP_ORIGIN'], $a))) {
+            if ('*' == trim($aClient['cors']) || (($a = explode(',', $aClient['cors'])) && in_array($_SERVER['HTTP_ORIGIN'], $a))) {
                 $sACAO = $_SERVER['HTTP_ORIGIN'];
             }
             else {