create api, site and add security improvements to apache config

Signed-off-by: Marek Küthe <m.k@mk16.de>
This commit is contained in:
Marek Küthe 2022-09-14 20:23:48 +02:00
parent 01af21f510
commit 69eabb70b8
No known key found for this signature in database
GPG key ID: 7E869146699108C7
9 changed files with 454 additions and 8 deletions

18
wwwroot/api.php Normal file
View file

@ -0,0 +1,18 @@
<?php
include 'config.php';
$api_version = '1.0';
header('Content-Type: application/json');
$res = array(
'version' => $api_version,
'ip' => $_SERVER['REMOTE_ADDR'],
'node_id' => $node_id,
'node_location' => $node_location,
'node_asn' => $node_asn
);
echo json_encode($res);
?>