Date
1 - 4 of 4
Wildcard routes, subdomains and failing smoke-test
Shannon Coen
Hello Johannes,
toggle quoted message
Show quoted text
You have observed expected behavior. Wildcard routes are designed to catch all subdomains, unless other routes (wildcard or otherwise) exist to match. Primary use cases for wildcard routes include custom 404 pages and maintenance pages. If you've created a route bar.io based on the domain bar.io, then *.bar.io can be used to provide a custom page for requests to any subdomain. Imagine if the wildcard only matched on the same subdomain level. To accomplish the same goal, a user might need 125 wildcard routes (*.bar.io, *.*.bar.io, *.*.*.bar.io, etc). Best, Shannon Coen Product Manager, Cloud Foundry Pivotal, Inc. On Thu, Feb 4, 2016 at 12:05 AM, Engelke, Johannes <info(a)johannes-engelke.de
wrote: Hi Dieu, |
|
Engelke, Johannes <info@...>
Hi Dieu,
toggle quoted message
Show quoted text
I had the same plans. But the solution feels a bit like a workaround. Is this behaviour expected? If not should I try to fix it? Cheers Johannes On 03 Feb 2016, at 11:14, Dieu Cao <dcao(a)pivotal.io <mailto:dcao(a)pivotal.io>> wrote: |
|
Dieu Cao <dcao@...>
You might consider making a tiny custom 404 app and then map *.cf.bar.io
toggle quoted message
Show quoted text
and *.foo.bar.io and any other sub domains to it so that it doesn't fall through to your landing page app. Would that work for you? -Dieu CF CAPI PM On Wed, Feb 3, 2016 at 12:46 AM, Engelke, Johannes <info(a)johannes-engelke.de
wrote: Hi, |
|
Engelke, Johannes <info@...>
Hi,
we got the following problem and I would like to know, if you have an idea how to solve it. We setup a view domains: - bar.io - foo.bar.io - cf.bar.io Bar.io is used for all the end user related things like the landing page, documentation, etc. foo.bar.io is used for internal service endpoints and cf.bar.io is used for all stuff related to CF (api, uaa, login…) and some shared things like monitoring UI etc. I created a route *.bar.io to move all typos etc. of our customer touch points to the central landing page. I was expecting <random>.cf.bar.io will be still return an 404 Route not found. Now smoketests (using cf.bar.io) are failing, because the wildcard domain is working recursive for all subdomains and is returning the content of *.bar app. (See: https://github.com/cloudfoundry/cf-smoke-tests/blob/master/smoke/runtime/runtime_test.go#L87-L93 <https://github.com/cloudfoundry/cf-smoke-tests/blob/master/smoke/runtime/runtime_test.go#L87-L93>) *.bar.io -> landing-page-app *.cf.bar.io -> landing-page-app (why?) *.foo.bar.io -> landing-page-app (why?) So my question, were should we fix it? Should the gorouter not be recursive over subdomains? Should we change the smoketest? Or am I on the wrong track and we should do something else? Cheers Johannes |
|