mirror of
https://github.com/nextcloud/server.git
synced 2026-03-12 05:33:11 -04:00
removing dead code
This commit is contained in:
parent
3e454d3459
commit
f998ed331a
1 changed files with 0 additions and 15 deletions
|
|
@ -3,22 +3,7 @@ $hostMetaHeader = array(
|
|||
'Access-Control-Allow-Origin' => '*',
|
||||
'Content-Type' => 'application/xrd+json'
|
||||
);
|
||||
$ownCloudDir = dirname(dirname(dirname(__FILE__)));
|
||||
$docRoot = $_SERVER['DOCUMENT_ROOT'];
|
||||
try {
|
||||
$webRoot = substr(realpath($ownCloudDir), strlen(realpath($docRoot)));
|
||||
} catch(Exception $e) {
|
||||
// some servers fail on realpath(), let's try it the unsecure way:
|
||||
$webRoot = substr($ownCloudDir, strlen($docRoot));
|
||||
}
|
||||
$serverName = $_SERVER['SERVER_NAME'];
|
||||
$lrddTmpl = 'http';
|
||||
if(isset($_SERVER['HTTPS'])) {
|
||||
$lrddTmpl .= 's';
|
||||
}
|
||||
$lrddTmpl .= '://' . $serverName . $webRoot . '/public.php?service=webfinger&q={uri}';
|
||||
$hostMetaPath = $docRoot . '/.well-known/host-meta';
|
||||
$hostMetaDir = $docRoot . '/.well-known';
|
||||
$hostMetaContents = "{\"links\":[{\"rel\":\"lrdd\",\"template\":\"http'.(isset($_SERVER['HTTPS'])?'s':'').'://'.$serverName.'/public.php?service=webfinger&q={uri}\"}]}";
|
||||
foreach($hostMetaHeader as $header => $value) {
|
||||
header($header . ": " . $value);
|
||||
|
|
|
|||
Loading…
Reference in a new issue