mirror of https://gitlab.com/bashrc2/epicyon
Bug fix for no referer domain on nodeinfo
parent
92f3bbb763
commit
3ec2831c71
|
@ -1332,6 +1332,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self._400()
|
self._400()
|
||||||
return True
|
return True
|
||||||
if self.server.nodeinfo_is_active:
|
if self.server.nodeinfo_is_active:
|
||||||
|
if not referer_domain:
|
||||||
|
print('nodeinfo is busy during request without referer domain')
|
||||||
|
else:
|
||||||
print('nodeinfo is busy during request from ' + referer_domain)
|
print('nodeinfo is busy during request from ' + referer_domain)
|
||||||
self._503()
|
self._503()
|
||||||
return True
|
return True
|
||||||
|
@ -1413,7 +1416,10 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self._set_headers('application/ld+json', msglen,
|
self._set_headers('application/ld+json', msglen,
|
||||||
None, calling_domain, True)
|
None, calling_domain, True)
|
||||||
self._write(msg)
|
self._write(msg)
|
||||||
|
if referer_domain:
|
||||||
print('nodeinfo sent to ' + referer_domain)
|
print('nodeinfo sent to ' + referer_domain)
|
||||||
|
else:
|
||||||
|
print('nodeinfo sent to unknown referer')
|
||||||
self.server.nodeinfo_is_active = False
|
self.server.nodeinfo_is_active = False
|
||||||
return True
|
return True
|
||||||
self._404()
|
self._404()
|
||||||
|
|
Loading…
Reference in New Issue