Add endpoint to get EXP Content Server base URL

This commit is contained in:
Kumi 2022-01-13 12:19:16 +01:00
parent c2fba554d7
commit 4d810ff93e

11
get_server.php Normal file
View file

@ -0,0 +1,11 @@
<?php
require('../../config.php');
$expconfig = get_config('mod_expcontent');
$baseurl = $expconfig->baseurl;
if ($baseurl[-1] != "/") $baseurl += "/";
header('Content-Type: application/json');
echo(json_encode(array("server"=>$baseurl)));