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

Fix DstHostIs check #608

Merged
merged 2 commits into from
Dec 30, 2024
Merged

Fix DstHostIs check #608

merged 2 commits into from
Dec 30, 2024

Conversation

ErikPelli
Copy link
Collaborator

@ErikPelli ErikPelli commented Dec 30, 2024

Fixes #301.
According to our documentation, DstHostIs "returns a ReqCondition testing wether the host in the request url is the given string".

However, in the Go documentation, Host can contain the host or the host:port combo, leading to an undefined behaviour.

To fix this issue, I call the Hostname method instead.
The user can also specify a port that we need to match, and in this case, its considered in the handler.

@ErikPelli ErikPelli merged commit 408830d into master Dec 30, 2024
1 check passed
@ErikPelli ErikPelli deleted the fix-hostname-check branch December 30, 2024 20:44
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.

DstHostIs returns with port
1 participant