Add support for subdomain checking in aliases and socket aliases #3458
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for subdomains in aliases and socket aliases
Details
New feature related to this issue #1466
When defining sockets or aliases we can mark them with subdomain so that when check_self is called it will match when there the host to check is subdomain of the alias, definition of the socket and alias as so
If either are set up this way then when check_self is called for example in the TM topology_hiding then if the request domain is something like
resource.my.subdomain.com
ordifferent.resource.my.subdomain.com
it will match the alias but also a deliberate design decision to allowmy.subdomain.com
to match too.Solution
A flag is added, when the
subdomain|SUBDOMAIN
flag is on the socket or alias this allows it to match addresses that match that alias subdomain while preserving strict matching when the flag is not setCompatibility
The flag is a new flag so existing config where the subdomain flag is not on the alias or socket will behave like it already does without this change, it's backwards compatible
Closing issues
closes #1466