mirror of https://gitlab.com/bashrc2/epicyon
Snake case
parent
2c02ed05eb
commit
e453d373b6
10
daemon.py
10
daemon.py
|
@ -797,7 +797,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.send_header('Set-Cookie', 'epicyon=; SameSite=Strict')
|
||||
self.send_header('Location', self._quoted_redirect(redirect))
|
||||
self.send_header('Host', callingDomain)
|
||||
self.send_header('X-AP-Instance-ID', self.server.instanceId)
|
||||
self.send_header('X-AP-Instance-ID', self.server.instance_id)
|
||||
self.send_header('Content-Length', '0')
|
||||
self.end_headers()
|
||||
|
||||
|
@ -820,7 +820,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
if permissive:
|
||||
self.send_header('Access-Control-Allow-Origin', '*')
|
||||
return
|
||||
self.send_header('X-AP-Instance-ID', self.server.instanceId)
|
||||
self.send_header('X-AP-Instance-ID', self.server.instance_id)
|
||||
self.send_header('X-Clacks-Overhead', 'GNU Natalie Nguyen')
|
||||
if cookie:
|
||||
cookieStr = cookie
|
||||
|
@ -917,7 +917,7 @@ class PubServer(BaseHTTPRequestHandler):
|
|||
self.send_header('Set-Cookie', cookieStr)
|
||||
self.send_header('Location', self._quoted_redirect(redirect))
|
||||
self.send_header('Host', callingDomain)
|
||||
self.send_header('X-AP-Instance-ID', self.server.instanceId)
|
||||
self.send_header('X-AP-Instance-ID', self.server.instance_id)
|
||||
self.send_header('Content-Length', '0')
|
||||
self.end_headers()
|
||||
|
||||
|
@ -18456,7 +18456,7 @@ def runDaemon(content_license_url: str,
|
|||
max_recent_posts: int,
|
||||
enable_shared_inbox: bool, registration: bool,
|
||||
language: str, project_version: str,
|
||||
instanceId: str, clientToServer: bool,
|
||||
instance_id: str, clientToServer: bool,
|
||||
base_dir: str, domain: str,
|
||||
onionDomain: str, i2pDomain: str,
|
||||
yt_replace_domain: str,
|
||||
|
@ -18726,7 +18726,7 @@ def runDaemon(content_license_url: str,
|
|||
httpd.shared_items_federated_domains = \
|
||||
shared_items_federated_domains.copy()
|
||||
httpd.base_dir = base_dir
|
||||
httpd.instanceId = instanceId
|
||||
httpd.instance_id = instance_id
|
||||
httpd.personCache = {}
|
||||
httpd.cachedWebfingers = {}
|
||||
httpd.faviconsCache = {}
|
||||
|
|
12
epicyon.py
12
epicyon.py
|
@ -1100,11 +1100,11 @@ if args.resetregistrations:
|
|||
print('Number of new registrations reset to ' + str(maxRegistrations))
|
||||
|
||||
# unique ID for the instance
|
||||
instanceId = getConfigParam(base_dir, 'instanceId')
|
||||
if not instanceId:
|
||||
instanceId = createPassword(32)
|
||||
setConfigParam(base_dir, 'instanceId', instanceId)
|
||||
print('Instance ID: ' + instanceId)
|
||||
instance_id = getConfigParam(base_dir, 'instance_id')
|
||||
if not instance_id:
|
||||
instance_id = createPassword(32)
|
||||
setConfigParam(base_dir, 'instance_id', instance_id)
|
||||
print('Instance ID: ' + instance_id)
|
||||
|
||||
# get domain name from configuration
|
||||
configDomain = getConfigParam(base_dir, 'domain')
|
||||
|
@ -3246,7 +3246,7 @@ if __name__ == "__main__":
|
|||
args.max_recent_posts,
|
||||
not args.nosharedinbox,
|
||||
registration, args.language, __version__,
|
||||
instanceId, args.client, base_dir,
|
||||
instance_id, args.client, base_dir,
|
||||
domain, onionDomain, i2pDomain,
|
||||
args.yt_replace_domain,
|
||||
args.twitterReplacementDomain,
|
||||
|
|
8
tests.py
8
tests.py
|
@ -813,7 +813,7 @@ def createServerAlice(path: str, domain: str, port: int,
|
|||
0, 100, 1024, 5, False,
|
||||
0, False, 1, False, False, False,
|
||||
5, True, True, 'en', __version__,
|
||||
"instanceId", False, path, domain,
|
||||
"instance_id", False, path, domain,
|
||||
onionDomain, i2pDomain, None, None, port, port,
|
||||
http_prefix, federationList, maxMentions, maxEmoji, False,
|
||||
proxyType, maxReplies,
|
||||
|
@ -955,7 +955,7 @@ def createServerBob(path: str, domain: str, port: int,
|
|||
0, 100, 1024, 5, False, 0,
|
||||
False, 1, False, False, False,
|
||||
5, True, True, 'en', __version__,
|
||||
"instanceId", False, path, domain,
|
||||
"instance_id", False, path, domain,
|
||||
onionDomain, i2pDomain, None, None, port, port,
|
||||
http_prefix, federationList, maxMentions, maxEmoji, False,
|
||||
proxyType, maxReplies,
|
||||
|
@ -1025,7 +1025,7 @@ def createServerEve(path: str, domain: str, port: int, federationList: [],
|
|||
0, 100, 1024, 5, False, 0,
|
||||
False, 1, False, False, False,
|
||||
5, True, True, 'en', __version__,
|
||||
"instanceId", False, path, domain,
|
||||
"instance_id", False, path, domain,
|
||||
onionDomain, i2pDomain, None, None, port, port,
|
||||
http_prefix, federationList, maxMentions, maxEmoji, False,
|
||||
proxyType, maxReplies, allowDeletion, True, True, False,
|
||||
|
@ -1097,7 +1097,7 @@ def createServerGroup(path: str, domain: str, port: int,
|
|||
0, 100, 1024, 5, False,
|
||||
0, False, 1, False, False, False,
|
||||
5, True, True, 'en', __version__,
|
||||
"instanceId", False, path, domain,
|
||||
"instance_id", False, path, domain,
|
||||
onionDomain, i2pDomain, None, None, port, port,
|
||||
http_prefix, federationList, maxMentions, maxEmoji, False,
|
||||
proxyType, maxReplies,
|
||||
|
|
Loading…
Reference in New Issue