aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Web/Router.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-09-20 19:12:23 -0700
committerzotlabs <mike@macgirvin.com>2017-09-20 19:12:23 -0700
commit7b060dff68841543e08e516a1dbdcdceea8fb59a (patch)
tree83cf1a73c692c08d9854d9b3886c7d9bf9beee81 /Zotlabs/Web/Router.php
parent90f759412b32485b029c2a43f9c01372e9fc83a7 (diff)
downloadvolse-hubzilla-7b060dff68841543e08e516a1dbdcdceea8fb59a.tar.gz
volse-hubzilla-7b060dff68841543e08e516a1dbdcdceea8fb59a.tar.bz2
volse-hubzilla-7b060dff68841543e08e516a1dbdcdceea8fb59a.zip
add HTTP link header to channel page, making it pluggable
Diffstat (limited to 'Zotlabs/Web/Router.php')
-rw-r--r--Zotlabs/Web/Router.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/Zotlabs/Web/Router.php b/Zotlabs/Web/Router.php
index 710aa2844..b0193652b 100644
--- a/Zotlabs/Web/Router.php
+++ b/Zotlabs/Web/Router.php
@@ -178,6 +178,25 @@ class Router {
*/
if(\App::$module_loaded) {
+ 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());
+ }
+
\App::$page['page_title'] = \App::$module;
$placeholder = '';