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