support for host-meta file
parent
fed5224f46
commit
ebf3d05620
|
@ -37,6 +37,19 @@ class WellKnown implements APIInterface
|
|||
$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
|
||||
*
|
||||
|
@ -56,6 +69,8 @@ class WellKnown implements APIInterface
|
|||
return $ni->exec($paths);
|
||||
}
|
||||
switch ($paths[1]) {
|
||||
case 'host-meta':
|
||||
return $this->hostMeta();
|
||||
case 'nodeinfo':
|
||||
$ni = new WellKnown\NodeInfo($this, $this->main);
|
||||
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