Whe have an internal dns with a domain like "org.les800"
when i'm trying to set the base url of the tower host with something like "tower.org.les800", it fail with an error 400 and url not valid
try an url like http://tower.org.les800 in settings/system
url for the base host set
got url with the name of the server instead
@fosterseth you mind taking a look at this? I'll bet it's similar to the LDAP bug you recently fixed.
@ryanpetrello yes it's same issue as the LDAP bug.
We can either make a new TowerURLBaseField class that subclasses URLField, and then feed in a custom regex pattern to the URLValidator to allow numbers in the top level domain. This is how it is done in the case of LDAPServerURIField.
Or more generally we can change some logic in class URLField that adds an allow_number_in_top_level_domain flag and if set to True, will pass the modified regex into the validator. That way any setting of this class can be configured to have numbers in the TLD going forward.
Or more generally we can change some logic in class URLField that adds an allow_number_in_top_level_domain flag and if set to True, will pass the modified regex into the validator. That way any setting of this class can be configured to have numbers in the TLD going forward.
I think this is probably a better idea going forward, and it probably makes sense to default allow_number_in_top_level_domain to True, given that numbers in TLDs is totally a thing.
connecting ldap stuff:
issue: https://github.com/ansible/awx/issues/3646
PR: https://github.com/ansible/awx/pull/4784
Most helpful comment
I think this is probably a better idea going forward, and it probably makes sense to default
allow_number_in_top_level_domaintoTrue, given that numbers in TLDs is totally a thing.