From cc7aee6c3e5618855e43f95f38adb3b899c260d1 Mon Sep 17 00:00:00 2001 From: Neil Orley Date: Tue, 19 Sep 2017 16:59:19 +0200 Subject: [PATCH] FIX Implementation of a Luracast recommandation for the REST api server (#7370) --- htdocs/api/class/api.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index 55b728d2a80..dcda8255e7c 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -58,7 +58,7 @@ class DolibarrApi $this->r = new Restler($production_mode, $refreshCache); $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file - $this->r->setBaseUrls($urlwithroot); + $this->r->setBaseUrls(DOL_MAIN_URL_ROOT, $urlwithroot); $this->r->setAPIVersion(1); }