forked from indymedia/epicyon
Prioritize nodeinfo
parent
2f5c061168
commit
6b4a23bcd3
17
daemon.py
17
daemon.py
|
@ -816,6 +816,15 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.end_headers()
|
self.end_headers()
|
||||||
|
|
||||||
def do_GET(self):
|
def do_GET(self):
|
||||||
|
# Since fediverse crawlers are quite active, make returning info to them high priority
|
||||||
|
# get nodeinfo endpoint
|
||||||
|
if self._nodeinfo():
|
||||||
|
return
|
||||||
|
|
||||||
|
# minimal mastodon api
|
||||||
|
if self._mastoApi():
|
||||||
|
return
|
||||||
|
|
||||||
if self.path=='/logout':
|
if self.path=='/logout':
|
||||||
msg=htmlLogin(self.server.translate, \
|
msg=htmlLogin(self.server.translate, \
|
||||||
self.server.baseDir,False).encode('utf-8')
|
self.server.baseDir,False).encode('utf-8')
|
||||||
|
@ -1259,14 +1268,6 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if self._webfinger():
|
if self._webfinger():
|
||||||
self.server.GETbusy=False
|
self.server.GETbusy=False
|
||||||
return
|
return
|
||||||
# get nodeinfo endpoint
|
|
||||||
if self._nodeinfo():
|
|
||||||
self.server.GETbusy=False
|
|
||||||
return
|
|
||||||
# minimal mastodon api
|
|
||||||
if self._mastoApi():
|
|
||||||
self.server.GETbusy=False
|
|
||||||
return
|
|
||||||
|
|
||||||
if self.path.startswith('/login') or \
|
if self.path.startswith('/login') or \
|
||||||
(self.path=='/' and not authorized):
|
(self.path=='/' and not authorized):
|
||||||
|
|
Loading…
Reference in New Issue