From 4e774139964d8d213ed6fab67140ac0083ba37cf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 25 Mar 2020 19:29:54 +0100 Subject: [PATCH] Try fix suggested in #13418 --- htdocs/api/index.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/api/index.php b/htdocs/api/index.php index 7a9ef9ad24d..50a37793273 100644 --- a/htdocs/api/index.php +++ b/htdocs/api/index.php @@ -56,6 +56,9 @@ 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' + $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) if (! empty($conf->global->MAIN_NGINX_FIX)) {