Skip to content

Commit 7049c9b

Browse files
author
Matthew Fisher
committed
fix(controller): allow xip.io domains
xip.io is a magic domain name that provides wildcard DNS for any IP IP address. In some cases when testing, DEIS_TEST_DOMAIN is set to an IP address of one of the nodes.
1 parent 0b7f529 commit 7049c9b

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

controller/api/serializers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ def validate_domain(self, value):
245245
if value[-1:] == ".":
246246
value = value[:-1] # strip exactly one dot from the right, if present
247247
labels = value.split('.')
248+
if 'xip.io' in value:
249+
return value
248250
if labels[0] == '*':
249251
raise serializers.ValidationError(
250252
'Adding a wildcard subdomain is currently not supported.')

controller/api/tests/test_domain.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def test_manage_domain(self):
5858
'3com.com',
5959
'w3.example.com',
6060
'MYDOMAIN.NET',
61+
'autotest.127.0.0.1.xip.io',
6162
]
6263
for domain in test_domains:
6364
body = {'domain': domain}

0 commit comments

Comments
 (0)