aboutsummaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2023-09-02 00:18:55 -0600
committerIván Ávalos <avalos@disroot.org>2023-09-02 00:41:00 -0600
commitaa1bac9aa30c6ba8ff48c8b70dfc523e3197e315 (patch)
treebe33e8c6dd22e1eb62a02488c0a305f11fcbfa75 /index.php
parent706c4cc1fa62492344089a3310c7bcea1041f78b (diff)
downloadmicroblog-aa1bac9aa30c6ba8ff48c8b70dfc523e3197e315.tar.gz
microblog-aa1bac9aa30c6ba8ff48c8b70dfc523e3197e315.tar.bz2
microblog-aa1bac9aa30c6ba8ff48c8b70dfc523e3197e315.zip
Remove ActivityPub and Twitter support, and fix localhost
Diffstat (limited to 'index.php')
-rw-r--r--index.php35
1 files changed, 1 insertions, 34 deletions
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') {