From f661e98880794c7156ef3740ed8e4dd17706b3bd Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 31 Aug 2021 17:53:59 +0100 Subject: [PATCH] Instance actor earlier --- daemon.py | 53 +++++++++++++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/daemon.py b/daemon.py index d13875d3b..5bbd9f64d 100644 --- a/daemon.py +++ b/daemon.py @@ -11201,6 +11201,29 @@ class PubServer(BaseHTTPRequestHandler): 'favicon.ico') return + # instance actor + if self.path == '/actor' or \ + self.path == '/users/actor' or \ + self.path == '/Actor' or \ + self.path == '/users/Actor': + self.path = '/users/inbox' + if self._showInstanceActor(callingDomain, self.path, + self.server.baseDir, + self.server.httpPrefix, + self.server.domain, + self.server.domainFull, + self.server.port, + self.server.onionDomain, + self.server.i2pDomain, + GETstartTime, GETtimings, + self.server.proxyType, + cookie, self.server.debug, + self.server.enableSharedInbox): + return + else: + self._404() + return + # check authorization authorized = self._isAuthorized() if self.server.debug: @@ -11479,32 +11502,10 @@ class PubServer(BaseHTTPRequestHandler): self._benchmarkGETtimings(GETstartTime, GETtimings, 'hasAccept', 'fonts') - if not htmlGET and \ - self.path == '/actor' or \ - self.path == '/users/actor' or \ - self.path == '/Actor' or \ - self.path == '/users/Actor': - self.path = '/users/inbox' - if self._showInstanceActor(callingDomain, self.path, - self.server.baseDir, - self.server.httpPrefix, - self.server.domain, - self.server.domainFull, - self.server.port, - self.server.onionDomain, - self.server.i2pDomain, - GETstartTime, GETtimings, - self.server.proxyType, - cookie, self.server.debug, - self.server.enableSharedInbox): - return - else: - self._404() - return - elif self.path == '/sharedInbox' or \ - self.path == '/users/inbox' or \ - self.path == '/actor/inbox' or \ - self.path == '/users/' + self.server.domain: + if self.path == '/sharedInbox' or \ + self.path == '/users/inbox' or \ + self.path == '/actor/inbox' or \ + self.path == '/users/' + self.server.domain: # if shared inbox is not enabled if not self.server.enableSharedInbox: self._503()