retain the default interstitial value for TOWER_URL_BASE

to support #5470, check for the presence of this special interstitial
value and replace it with the request hostname for settings OPTIONS
requests
This commit is contained in:
Ryan Petrello 2017-02-23 16:38:16 -05:00
parent fd7c2550ee
commit 5dfdef6e6b
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ class Metadata(metadata.SimpleMetadata):
# FIXME: Still isn't showing all default values?
try:
default = field.get_default()
if not default and field.field_name == 'TOWER_URL_BASE':
if field.field_name == 'TOWER_URL_BASE' and default == 'https://towerhost':
default = '{}://{}'.format(self.request.scheme, self.request.get_host())
field_info['default'] = default
except serializers.SkipField:

View File

@ -861,7 +861,7 @@ ORG_ADMINS_CAN_SEE_ALL_USERS = True
TOWER_ADMIN_ALERTS = True
# Note: This setting may be overridden by database settings.
TOWER_URL_BASE = ""
TOWER_URL_BASE = "https://towerhost"
TOWER_SETTINGS_MANIFEST = {}