support for host-meta file
parent
fed5224f46
commit
ebf3d05620
|
@ -37,6 +37,19 @@ class WellKnown implements APIInterface
|
||||||
$this->main = $main;
|
$this->main = $main;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* return host-meta information
|
||||||
|
*
|
||||||
|
* @return true
|
||||||
|
*/
|
||||||
|
private function hostMeta()
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
'fqdn' => $_SERVER['SERVER_NAME']
|
||||||
|
];
|
||||||
|
$this->response = $this->main->renderTemplate('host-meta.xml', $data);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* run given url path
|
* run given url path
|
||||||
*
|
*
|
||||||
|
@ -56,6 +69,8 @@ class WellKnown implements APIInterface
|
||||||
return $ni->exec($paths);
|
return $ni->exec($paths);
|
||||||
}
|
}
|
||||||
switch ($paths[1]) {
|
switch ($paths[1]) {
|
||||||
|
case 'host-meta':
|
||||||
|
return $this->hostMeta();
|
||||||
case 'nodeinfo':
|
case 'nodeinfo':
|
||||||
$ni = new WellKnown\NodeInfo($this, $this->main);
|
$ni = new WellKnown\NodeInfo($this, $this->main);
|
||||||
return $ni->exec($paths);
|
return $ni->exec($paths);
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
version="1.0" encoding="UTF-8"?>
|
||||||
|
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
|
||||||
|
<Link rel="lrdd" template="https://{$fqdn}/.well-known/webfinger?resource={ldelim}uri{rdelim}"/>
|
||||||
|
</XRD>
|
Loading…
Reference in New Issue