diff options
author | Richard van der Hoff <1389908+richvdh@users.noreply.github.com> | 2021-11-08 14:13:10 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-08 14:13:10 +0000 |
commit | 86a497efaa60cf0e456103724c369e5172ea5485 (patch) | |
tree | 2e07fa7cb1f4994a33fd901f20d97f7e36b3a474 /synapse/config/saml2.py | |
parent | Address review feedback from #11269 (#11273) (diff) | |
download | synapse-86a497efaa60cf0e456103724c369e5172ea5485.tar.xz |
Default value for `public_baseurl` (#11210)
We might as well use a default value for `public_baseurl` based on `server_name` - in many cases, it will be correct.
Diffstat (limited to 'synapse/config/saml2.py')
-rw-r--r-- | synapse/config/saml2.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/synapse/config/saml2.py b/synapse/config/saml2.py index 9c51b6a25a..ba2b0905ff 100644 --- a/synapse/config/saml2.py +++ b/synapse/config/saml2.py @@ -199,14 +199,11 @@ class SAML2Config(Config): """ import saml2 - public_baseurl = self.root.server.public_baseurl - if public_baseurl is None: - raise ConfigError("saml2_config requires a public_baseurl to be set") - if self.saml2_grandfathered_mxid_source_attribute: optional_attributes.add(self.saml2_grandfathered_mxid_source_attribute) optional_attributes -= required_attributes + public_baseurl = self.root.server.public_baseurl metadata_url = public_baseurl + "_synapse/client/saml2/metadata.xml" response_url = public_baseurl + "_synapse/client/saml2/authn_response" return { |