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 match of prefix pathtype if using default host #908

Merged
merged 1 commit into from
Mar 23, 2022

Conversation

jcmoraisjr
Copy link
Owner

HAProxy's subdir match type is used to implement the Prefix pathType. This match type however doesn't implement exactly what is expected from the Prefix type if a single slash is used as the pattern - ingress expects that /bar would match, but it doesn't, matching only /bar/ instead. This works well with declared hostnames because HAProxy Ingress builds the pattern concatenating hostname and path, but this doesn't happen with the default hostname where the path is configured alone.

This update adds a prefix in the default hostname patterns, just like it's already happening with declared hostnames, in order to them to behave in the same way.

HAProxy's subdir match type is used to implement the `Prefix` pathType.
This match type however doesn't implement exactly what is expected from
the `Prefix` type if a single slash is used as the pattern - ingress
expects that `/bar` would match, but it doesn't, matching only `/bar/`
instead. This works well with declared hostnames because HAProxy Ingress
builds the pattern concatenating hostname and path, but this doesn't
happen with the default hostname where the path is configured alone.

This update adds a prefix in the default hostname patterns, just like
it's already happening with declared hostnames, in order to them to
behave in the same way.
@jcmoraisjr
Copy link
Owner Author

#906

@jcmoraisjr jcmoraisjr merged commit 72b735b into master Mar 23, 2022
@jcmoraisjr jcmoraisjr deleted the jm-fix-match-prefix branch March 23, 2022 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant