diff options
author | Arno Richter <oelna@oelna.de> | 2023-08-16 14:52:58 +0200 |
---|---|---|
committer | Arno Richter <oelna@oelna.de> | 2023-08-16 14:52:58 +0200 |
commit | 66c6658bac8b0e99b59e3b9f4eb285f38bcebcf5 (patch) | |
tree | fa54ab21d4c6122df124459030dd5c6af723f1af /index.php | |
parent | ff2858b6ea8f586daa95e51ae21315f86cc5ded5 (diff) | |
download | microblog-66c6658bac8b0e99b59e3b9f4eb285f38bcebcf5.tar.gz microblog-66c6658bac8b0e99b59e3b9f4eb285f38bcebcf5.tar.bz2 microblog-66c6658bac8b0e99b59e3b9f4eb285f38bcebcf5.zip |
huge update to implement first version of activitypub support. closes #16. AP and subdir hosting are incompatible!
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -16,6 +16,9 @@ } else { $page = mb_strtolower(path(0)); + // why? + // if($page == '.well_known' && path(1) == 'webfinger') { $page = 'webfinger'; } + switch($page) { case 'login': $template = 'login'; @@ -46,12 +49,35 @@ die(); } break; + /* + case 'webfinger': + die('aaaa'); + if(!empty(path(1)) && path(1) == 'webfinger') { + require_once(ROOT.DS.'lib'.DS.'activitypub-webfinger.php'); + } else { + die('xxx'); + http_response_code(404); + die(); + } + die('abc'); + break; + */ case 'actor': require_once(ROOT.DS.'lib'.DS.'activitypub-actor.php'); break; + case 'followers': + require_once(ROOT.DS.'lib'.DS.'activitypub-followers.php'); + break; + case 'outbox': + require_once(ROOT.DS.'lib'.DS.'activitypub-outbox.php'); + break; + case 'inbox': + require_once(ROOT.DS.'lib'.DS.'activitypub-inbox.php'); + break; default: // redirect everything else to the homepage if(!empty(path(0)) && path(0) != 'page') { + // die(path(0) . path(1) . 'WTF'); header('Location: '.$config['url']); die(); } |