Add endpoint to get EXP Content Server base URL
This commit is contained in:
parent
c2fba554d7
commit
4d810ff93e
1 changed files with 11 additions and 0 deletions
11
get_server.php
Normal file
11
get_server.php
Normal 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)));
|
Loading…
Reference in a new issue