diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-09-26 19:55:18 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-09-26 19:55:18 +0200 |
commit | cee41bb1e5cc9d7ea6d49183e78fcb2f5f0d1472 (patch) | |
tree | 38383bb40e58ee85fb6296a69667411ee92b0da5 /Zotlabs/Web/WebServer.php | |
parent | 4a270d10d189471496438489a9b444bd12340aab (diff) | |
parent | 86e888e5ebf4090dbab33a28a68fa67b93566417 (diff) | |
download | volse-hubzilla-cee41bb1e5cc9d7ea6d49183e78fcb2f5f0d1472.tar.gz volse-hubzilla-cee41bb1e5cc9d7ea6d49183e78fcb2f5f0d1472.tar.bz2 volse-hubzilla-cee41bb1e5cc9d7ea6d49183e78fcb2f5f0d1472.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs/Web/WebServer.php')
-rw-r--r-- | Zotlabs/Web/WebServer.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Zotlabs/Web/WebServer.php b/Zotlabs/Web/WebServer.php index 8431a2e0e..65b772fee 100644 --- a/Zotlabs/Web/WebServer.php +++ b/Zotlabs/Web/WebServer.php @@ -107,6 +107,34 @@ class WebServer { $Router = new Router($a); + /* Initialise the Link: response header if this is a channel page. + * This cannot be done inside the channel module because some protocol + * addons over-ride the module functions and these links are common + * to all protocol drivers; thus doing it here avoids duplication. + */ + + if (( \App::$module === 'channel' ) && argc() > 1) { + \App::$channel_links = [ + [ + 'rel' => 'lrdd', + 'type' => 'application/xrd+xml', + 'url' => z_root() . '/xrd?f=&uri=acct%3A' . argv(1) . '%40' . \App::get_hostname() + ], + [ + 'rel' => 'jrd', + 'type' => 'application/jrd+json', + 'url' => z_root() . '/.well-known/webfinger?f=&resource=acct%3A' . argv(1) . '%40' . \App::get_hostname() + ], + ]; + $x = [ 'channel_address' => argv(1), 'channel_links' => \App::$channel_links ]; + call_hooks('channel_links', $x ); + \App::$channel_links = $x['channel_links']; + header('Link: ' . \App::get_channel_links()); + } + + + + /* initialise content region */ if(! x(\App::$page, 'content')) |