improve robustness of host comparision for wss:// Origin headers

see: https://github.com/ansible/tower/issues/2647
This commit is contained in:
Ryan Petrello
2018-07-24 11:28:43 -04:00
parent c0da6f04cd
commit 4b3ca080d4
4 changed files with 84 additions and 3 deletions

View File

@@ -101,6 +101,17 @@ register(
category_slug='system',
)
register(
'WEBSOCKET_ORIGIN_WHITELIST',
field_class=fields.StringListField,
label=_('Websocket Origin Whitelist'),
help_text=_("If Tower is behind a reverse proxy/load balancer, use this setting "
"to whitelist hostnames which represent trusted Origin hostnames from which "
"Tower should allow websocket connections."),
category=_('System'),
category_slug='system',
)
def _load_default_license_from_file():
try: