apisix icon indicating copy to clipboard operation
apisix copied to clipboard

bug: why does host proxy_write not support such as ip+port

Open jeesk opened this issue 5 years ago • 5 comments

Issue description

when I set host of proxy_wiite, tell me Invalid plugin data does not match the regex pattern ^[0-9a-zA-Z-.]+$.

Environment

  • apisix version 2.1
  • apisix dashboard version: 2.2
  • OS: centos 7.8
  • OpenResty openresty/1.19.3.1

Minimal test code / Steps to reproduce the issue

1. 2. 3.

What's the actual result? (including assertion message & call stack if applicable)

What's the expected result?

插件有问题

jeesk avatar Dec 27 '20 10:12 jeesk

Are you talking about the proxy_rewrite plugin? See if the format of the host you set is incorrect, the host you set needs to meet the prompt the regex pattern ^[0-9a-zA-Z-.]+$. For example: 192.168.12.34.

Firstsawyou avatar Dec 27 '20 11:12 Firstsawyou

Now the host cannot contain :, but the document did not explain it, I think is a good feat. @spacewander

idbeta avatar Dec 27 '20 14:12 idbeta

ping @jeesk

membphis avatar Dec 29 '20 14:12 membphis

Are you talking about the proxy_rewrite plugin? See if the format of the host you set is incorrect, the host you set needs to meet the prompt the regex pattern ^[0-9a-zA-Z-.]+$. For example: 192.168.12.34.

yes

jeesk avatar Jan 08 '21 13:01 jeesk

we should support this case. @jeesk would you like to submit a PR about this issue?

membphis avatar Jan 11 '21 12:01 membphis