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

Allow healthcheck to work in host_matching mode #198

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

samuelhwilliams
Copy link
Contributor

When a Flask app is running in host_matching mode, it will only route inbound requests to registered endpoints that set a host parameter on the route.

In order to register a view against all hosts, you can use route variables like normal, so <host> will match any route and pass the value through as the variable host to the view.

MarcUsher
MarcUsher previously approved these changes Dec 9, 2024
Copy link

@MarcUsher MarcUsher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

When a Flask app is running in `host_matching` mode, it will only route
inbound requests to registered endpoints that set a `host` parameter on
the route.

In order to register a view against all hosts, you can use route
variables like normal, so `<host>` will match any route and pass the
value through as the variable `host` to the view.
Copy link

@MarcUsher MarcUsher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@samuelhwilliams samuelhwilliams merged commit 6664c0b into main Dec 9, 2024
8 checks passed
@samuelhwilliams samuelhwilliams deleted the bau/healthcheck-any-host branch December 9, 2024 15:11
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.

2 participants