From aa1bac9aa30c6ba8ff48c8b70dfc523e3197e315 Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Sat, 2 Sep 2023 00:18:55 -0600 Subject: Remove ActivityPub and Twitter support, and fix localhost --- index.php | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 6b1a49c..9b2aba9 100644 --- a/index.php +++ b/index.php @@ -25,7 +25,7 @@ require_once(ROOT.DS.'templates'.DS.'loginform.inc.php'); break; case 'logout': - $domain = ($_SERVER['HTTP_HOST'] != 'localhost') ? $_SERVER['HTTP_HOST'] : false; + $domain = ($_SERVER['SERVER_NAME'] != 'localhost') ? $_SERVER['HTTP_HOST'] : false; setcookie('microblog_login', '', time()-3600, '/', $domain, false); unset($_COOKIE['microblog_login']); @@ -41,39 +41,6 @@ case 'xmlrpc': require_once(ROOT.DS.'lib'.DS.'xmlrpc.php'); break; - case '.well-known': - if(!empty(path(1)) && path(1) == 'webfinger') { - require_once(ROOT.DS.'lib'.DS.'activitypub-webfinger.php'); - } else { - http_response_code(404); - 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') { -- cgit v1.2.3