Fix pregex
This commit is contained in:
parent
f0de10897a
commit
fb5363d857
@ -56,7 +56,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
|
||||
$url = $_SERVER['PHP_SELF'];
|
||||
if (preg_match('/api\/index\.php$', $url)) { // sometimes $_SERVER['PHP_SELF'] is 'api\/index\.php' instead of 'api\/index\.php/explorer.php' or 'api\/index\.php/method'
|
||||
if (preg_match('/api\/index\.php$/', $url)) { // sometimes $_SERVER['PHP_SELF'] is 'api\/index\.php' instead of 'api\/index\.php/explorer.php' or 'api\/index\.php/method'
|
||||
$url = $_SERVER['PHP_SELF'].$_SERVER['PATH_INFO'];
|
||||
}
|
||||
// Fix for some NGINX setups (this should not be required even with NGINX, however setup of NGINX are often mysterious and this may help is such cases)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user