Snake case

merge-requests/30/head
Bob Mottram 2021-12-25 20:36:53 +00:00
parent 2c02ed05eb
commit e453d373b6
3 changed files with 15 additions and 15 deletions

View File

@ -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 = {}

View File

@ -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,

View File

@ -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,