Skip to content

Commit 5d1e2d9

Browse files
committed
feat(router): route deis.domain to controller
Forwards requests to deis.domain to the controller. TESTING: rebuild the router and controller with this change: $ make -C router build restart $ make -C controller build restart Test that deis.domain routes to the controller and that other requests to the domain route to the app. Also, send several requests to the API and be sure that nothing broke related to auth because of the proxying of requests. The integration tests were updated to test the controller and the app routing, so you can also `cd test && bundle exec rake`. Also, try creating an app with the name of 'deis' - it should be rejected. replaces #974 part of #535
1 parent f80e965 commit 5d1e2d9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

api/serializers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,14 @@ class Meta:
129129

130130
def validate_id(self, attrs, source):
131131
"""
132-
Check that the ID is all lowercase
132+
Check that the ID is all lowercase and not 'deis'
133133
"""
134134
value = attrs[source]
135135
match = re.match(r'^[a-z0-9-]+$', value)
136136
if not match:
137137
raise serializers.ValidationError("App IDs can only contain [a-z0-9-]")
138+
if value == 'deis':
139+
raise serializers.ValidationError("App IDs cannot be 'deis'")
138140
return attrs
139141

140142

0 commit comments

Comments
 (0)