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

bug: Host matching cannot carry ports #2064

Closed
DokiDoki1103 opened this issue Nov 22, 2023 · 5 comments · May be fixed by #2065
Closed

bug: Host matching cannot carry ports #2064

DokiDoki1103 opened this issue Nov 22, 2023 · 5 comments · May be fixed by #2065
Labels

Comments

@DokiDoki1103
Copy link

DokiDoki1103 commented Nov 22, 2023

Current Behavior

The ApisixRoute "rbd-http-routes" is invalid: spec.http.match.hosts: Invalid value: "8.130.141.31:7070": spec.http.match.hosts in body should match '^*?[0-9a-zA-Z-._]+$'

/^\*?[0-9a-zA-Z-._]+$/.test('8.130.141.31:7070')
false 
/^\*?[0-9a-zA-Z-._]+$/.test('8.130.141.31') 
true

Some users access their applications through IP and ports, and use the HTTP protocol, so they hope to increase support for the HTTP port

@DokiDoki1103
Copy link
Author

cc @Revolyssup

@Revolyssup
Copy link
Contributor

@DokiDoki1103 Thanks for catching this. The regex that APISIX accepts for this field doesn't match with the one accepted by ingress controller. I will create a fix for this. https://github.com/apache/apisix/blob/a2da5f156c433b373ba670ce9eecdfdcb4cf7268/apisix/schema_def.lua#L40C23-L40C51

@DokiDoki1103
Copy link
Author

@Revolyssup You're welcome, I'm using Apisix extensively. If I encounter any problems, I'll give you feedback promptly

Copy link

This issue has been marked as stale due to 90 days of inactivity. It will be closed in 30 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.

@github-actions github-actions bot added the stale label Feb 29, 2024
Copy link

This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.

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

Successfully merging a pull request may close this issue.

2 participants