mirror of https://gitlab.com/bashrc2/epicyon
Show calling domains for API
parent
e2e8aeafe7
commit
a661a368ca
|
@ -1091,7 +1091,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self._set_headers('application/ld+json', msglen,
|
self._set_headers('application/ld+json', msglen,
|
||||||
None, callingDomain, True)
|
None, callingDomain, True)
|
||||||
self._write(msg)
|
self._write(msg)
|
||||||
print('nodeinfo sent')
|
print('nodeinfo sent to ' + callingDomain)
|
||||||
return True
|
return True
|
||||||
self._404()
|
self._404()
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -208,7 +208,7 @@ def mastoApiV1Response(path: str, callingDomain: str,
|
||||||
registration,
|
registration,
|
||||||
systemLanguage,
|
systemLanguage,
|
||||||
projectVersion)
|
projectVersion)
|
||||||
sendJsonStr = 'masto API instance metadata sent'
|
sendJsonStr = 'masto API instance metadata sent ' + callingDomain
|
||||||
elif path.startswith('/api/v1/instance/peers'):
|
elif path.startswith('/api/v1/instance/peers'):
|
||||||
# This is just a dummy result.
|
# This is just a dummy result.
|
||||||
# Showing the full list of peers would have privacy implications.
|
# Showing the full list of peers would have privacy implications.
|
||||||
|
@ -216,8 +216,8 @@ def mastoApiV1Response(path: str, callingDomain: str,
|
||||||
# small instances a full list of peers would convey a lot of
|
# small instances a full list of peers would convey a lot of
|
||||||
# information about the interests of a small number of accounts
|
# information about the interests of a small number of accounts
|
||||||
sendJson = ['mastodon.social', domainFull]
|
sendJson = ['mastodon.social', domainFull]
|
||||||
sendJsonStr = 'masto API peers metadata sent'
|
sendJsonStr = 'masto API peers metadata sent ' + callingDomain
|
||||||
elif path.startswith('/api/v1/instance/activity'):
|
elif path.startswith('/api/v1/instance/activity'):
|
||||||
sendJson = []
|
sendJson = []
|
||||||
sendJsonStr = 'masto API activity metadata sent'
|
sendJsonStr = 'masto API activity metadata sent ' + callingDomain
|
||||||
return sendJson, sendJsonStr
|
return sendJson, sendJsonStr
|
||||||
|
|
Loading…
Reference in New Issue