nextcloud/apps/user_webfinger/host-meta.php

12 lines
422 B
PHP
Raw Normal View History

2011-10-09 19:12:16 +04:00
<?php
$hostMetaHeader = array(
'Access-Control-Allow-Origin' => '*',
2012-05-11 17:27:11 +04:00
'Content-Type' => 'application/xrd+json'
);
$serverName = $_SERVER['SERVER_NAME'];
2012-05-17 23:03:06 +04:00
$hostMetaContents = '{"links":[{"rel":"lrdd","template":"http'.(isset($_SERVER['HTTPS'])?'s':'').'://'.$serverName.'/public.php?service=webfinger&q={uri}"}]}';
foreach($hostMetaHeader as $header => $value) {
2012-05-11 12:47:42 +04:00
header($header . ": " . $value);
}
2012-05-11 12:47:42 +04:00
echo $hostMetaContents;