mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 08:46:04 -04:00
Use direct references for some configuration variables (#10798)
Instead of proxying through the magic getter of the RootConfig object. This should be more performant (and is more explicit).
This commit is contained in:
parent
9f111075e8
commit
01c88a09cd
66 changed files with 152 additions and 133 deletions
|
@ -86,12 +86,12 @@ class LocalKey(Resource):
|
|||
|
||||
json_object = {
|
||||
"valid_until_ts": self.valid_until_ts,
|
||||
"server_name": self.config.server_name,
|
||||
"server_name": self.config.server.server_name,
|
||||
"verify_keys": verify_keys,
|
||||
"old_verify_keys": old_verify_keys,
|
||||
}
|
||||
for key in self.config.signing_key:
|
||||
json_object = sign_json(json_object, self.config.server_name, key)
|
||||
json_object = sign_json(json_object, self.config.server.server_name, key)
|
||||
return json_object
|
||||
|
||||
def render_GET(self, request):
|
||||
|
|
|
@ -224,7 +224,9 @@ class RemoteKey(DirectServeJsonResource):
|
|||
for key_json in json_results:
|
||||
key_json = json_decoder.decode(key_json.decode("utf-8"))
|
||||
for signing_key in self.config.key_server_signing_keys:
|
||||
key_json = sign_json(key_json, self.config.server_name, signing_key)
|
||||
key_json = sign_json(
|
||||
key_json, self.config.server.server_name, signing_key
|
||||
)
|
||||
|
||||
signed_keys.append(key_json)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue