1
0
mirror of https://github.com/Daichimarukana/uwuzu.git synced 2026-06-05 11:34:41 +00:00
Files
uwuzu-mirror/.well-known/nodeinfo/index.php
T
2023-10-22 23:45:14 +09:00

21 lines
539 B
PHP

<?php
$activitypub_file = "../../server/activitypub.txt";
if(file_get_contents($activitypub_file) === "true"){
header("Content-Type: application/json; charset=utf-8");
$domain = $_SERVER['HTTP_HOST'];
$item = array(
"links" => [
array(
"rel" => "http://nodeinfo.diaspora.software/ns/schema/2.1",
"href" => "https://".$domain."/nodeinfo/2.1",
),
],
);
echo json_encode($item, JSON_UNESCAPED_UNICODE);
}else{
header("HTTP/1.1 410 Gone");
}
?>