aboutsummaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorArno Richter <oelna@oelna.de>2023-08-16 14:52:58 +0200
committerArno Richter <oelna@oelna.de>2023-08-16 14:52:58 +0200
commit66c6658bac8b0e99b59e3b9f4eb285f38bcebcf5 (patch)
treefa54ab21d4c6122df124459030dd5c6af723f1af /index.php
parentff2858b6ea8f586daa95e51ae21315f86cc5ded5 (diff)
downloadmicroblog-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.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/index.php b/index.php
index 9429f19..6b1a49c 100644
--- a/index.php
+++ b/index.php
@@ -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();
}