summary refs log tree commit diff
path: root/synapse/config/tls.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-03-16 15:26:24 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-03-16 15:26:24 +0000
commit3d5a537934be57d07520abaeeb458dff9bd1f4db (patch)
treed36cc561bab3acbe8db1e84a0b157104dbc4b2a8 /synapse/config/tls.py
parentMerge pull request #6231 from matrix-org/erikj/refactor_stores (diff)
parentAdd config linting script that checks for bool casing (#6203) (diff)
downloadsynapse-3d5a537934be57d07520abaeeb458dff9bd1f4db.tar.xz
Add config linting script that checks for bool casing (#6203)
* commit '409c62b27':
  Add config linting script that checks for bool casing (#6203)
Diffstat (limited to 'synapse/config/tls.py')
-rw-r--r--synapse/config/tls.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/synapse/config/tls.py b/synapse/config/tls.py

index f06341eb67..2e9e478a2a 100644 --- a/synapse/config/tls.py +++ b/synapse/config/tls.py
@@ -289,6 +289,9 @@ class TlsConfig(Config): "http://localhost:8009/.well-known/acme-challenge" ) + # flake8 doesn't recognise that variables are used in the below string + _ = tls_enabled, proxypassline, acme_enabled, default_acme_account_file + return ( """\ ## TLS ## @@ -451,7 +454,11 @@ class TlsConfig(Config): #tls_fingerprints: [{"sha256": "<base64_encoded_sha256_fingerprint>"}] """ - % locals() + # Lowercase the string representation of boolean values + % { + x[0]: str(x[1]).lower() if isinstance(x[1], bool) else x[1] + for x in locals().items() + } ) def read_tls_certificate(self):