FIX wrong basePath in the swagger view

Behind a reverse proxy the basePath seems to be in http.
Forcing the basePath to DOL_MAIN_URL_ROOT fixes the problem.
This commit is contained in:
Neil Orley
2017-09-08 14:35:44 +02:00
parent 835cd43565
commit 17da808325

View File

@@ -56,7 +56,7 @@ class DolibarrApi
$this->db = $db;
$production_mode = ( empty($conf->global->API_PRODUCTION_MODE) ? false : true );
$this->r = new Restler($production_mode, $refreshCache);
$this->r->setBaseUrls(DOL_MAIN_URL_ROOT);
$this->r->setAPIVersion(1);
}