mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Update index.php
This commit is contained in:
parent
2c06969c2a
commit
74473edb0c
|
|
@ -38,9 +38,6 @@ if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is p
|
|||
if (! empty($_SERVER['HTTP_DOLAPIENTITY'])) define("DOLENTITY", (int) $_SERVER['HTTP_DOLAPIENTITY']);
|
||||
|
||||
|
||||
// Fix for NGINX
|
||||
$url = (isset($_SERVER['SCRIPT_URI']) && $_SERVER["SCRIPT_URI"] !== null) ? $_SERVER["SCRIPT_URI"] : $_SERVER['PHP_SELF'];
|
||||
|
||||
$res=0;
|
||||
if (! $res && file_exists("../main.inc.php")) $res=include '../main.inc.php';
|
||||
if (! $res) die("Include of main fails");
|
||||
|
|
@ -58,7 +55,13 @@ require_once DOL_DOCUMENT_ROOT.'/api/class/api_access.class.php';
|
|||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
|
||||
|
||||
$url = $_SERVER['PHP_SELF'];
|
||||
// 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))
|
||||
{
|
||||
$url = (isset($_SERVER['SCRIPT_URI']) && $_SERVER["SCRIPT_URI"] !== null) ? $_SERVER["SCRIPT_URI"] : $_SERVER['PHP_SELF'];
|
||||
}
|
||||
|
||||
// Enable and test if module Api is enabled
|
||||
if (empty($conf->global->MAIN_MODULE_API))
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user