mirror of
https://github.com/ansible/awx.git
synced 2026-02-24 06:26:00 -03:30
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user