Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve subdomain and host matching #3006

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

improve subdomain and host matching #3006

wants to merge 1 commit into from

Conversation

davidism
Copy link
Member

Map takes subdomain_matching, moving the behavior out of Flask pallets/flask#5634. It's enabled by default to match current behavior. If it and host_matching are disabled, the request's Host doesn't factor into routing at all.

bind_to_environ server_name is not used if host_matching is enabled, otherwise it would restrict routing to only that host. If subdomain_matching is enabled and a subdomain couldn't be detected, default_subdomain is used if set, rather than always "<invalid>".

This did not affect any existing tests. Leaving as draft until I have a chance to write tests and docs for all this. I also want to consider the use of `"" more, whether it should always be used (current behavior) or never be used (further than this PR).

fixes #3005

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add subdomain_matching param to Map
1 participant