ensure host xrd is correct, even if installed in subpath
This commit is contained in:
parent
de131c9e58
commit
b5ccb8e205
3 changed files with 7 additions and 7 deletions
2
boot.php
2
boot.php
|
@ -290,7 +290,7 @@ class App {
|
|||
|
||||
if($this->cmd === '.well-known/host-meta') {
|
||||
require_once('include/hostxrd.php');
|
||||
hostxrd($this->hostname);
|
||||
hostxrd($this->get_baseurl());
|
||||
// NOTREACHED
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
|
||||
function hostxrd($hostname) {
|
||||
function hostxrd($baseurl) {
|
||||
|
||||
header("Content-type: text/xml");
|
||||
$tpl = file_get_contents('view/xrd_host.tpl');
|
||||
echo str_replace('$domain',$hostname,$tpl);
|
||||
echo str_replace('$domain',$baseurl,$tpl);
|
||||
session_write_close();
|
||||
exit();
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
<hm:Host>$domain</hm:Host>
|
||||
|
||||
<Link rel='lrdd' template='http://$domain/xrd/?uri={uri}' />
|
||||
<Link rel='acct-mgmt' href='http://$domain/amcd' />
|
||||
<Link rel='http://services.mozilla.com/amcd/0.1' href='http://$domain/amcd' />
|
||||
<Link rel='lrdd' template='$domain/xrd/?uri={uri}' />
|
||||
<Link rel='acct-mgmt' href='$domain/amcd' />
|
||||
<Link rel='http://services.mozilla.com/amcd/0.1' href='$domain/amcd' />
|
||||
<Link rel="http://oexchange.org/spec/0.8/rel/resident-target" type="application/xrd+xml"
|
||||
href="http://$domain/oexchange/xrd" />
|
||||
href="$domain/oexchange/xrd" />
|
||||
</XRD>
|
||||
|
|
Loading…
Reference in a new issue