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

request help: property "hosts" validation failed: failed to validate item #6142

Closed
kongjun01 opened this issue Jan 18, 2022 · 5 comments
Closed
Labels

Comments

@kongjun01
Copy link

Issue description

my route host is engine*.cacazhu.com ,Can support begin xxx*.xxxx.com?

Environment

  • apisix version (cmd: apisix version):
  • OS (cmd: uname -a): 2.10.3
  • OpenResty / Nginx version (cmd: nginx -V or openresty -V):
  • etcd version, if have (cmd: run curl http://127.0.0.1:9090/v1/server_info to get the info from server-info API):
  • apisix-dashboard version, if have:
  • the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
  • luarocks version, if the issue is about installation (cmd: luarocks --version):
@kongjun01 kongjun01 changed the title property "hosts" validation failed: failed to validate itemrequest help: property "hosts" validation failed: failed to validate item Jan 18, 2022
@kongjun01 kongjun01 changed the title property "hosts" validation failed: failed to validate item request help: property "hosts" validation failed: failed to validate item Jan 18, 2022
@leslie-tsang
Copy link
Member

AFAIK, not support yet, you can design a custom plugin to achieve this.

@kongjun01
Copy link
Author

kongjun01 commented Jan 18, 2022

Can you provide an train of thought. i have many services, such as xx*.xx.com/a -> a, xx*.xx.com/b -> b, this requires global plug-ins, I don't think it's a good solution.

@kongjun01
Copy link
Author

kongjun01 commented Jan 19, 2022

I modified the radixtree_host_uri.lua source code, when insert host routes, the original logic is to reverse the host. I add a property in route. when it is turned on, the last one reverse once again, for example, host is test*.baidu.com, it will become moc.udiab.test*.

@leslie-tsang
Copy link
Member

Hello there, seems we have a solution here.

@leslie-tsang
Copy link
Member

@juzhiyuan Considered solved. Feel free to reopen it if needed.

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

No branches or pull requests

3 participants