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

路由设置proxy-rewrite BUG #346

Closed
longshang opened this issue Jul 28, 2020 · 11 comments
Closed

路由设置proxy-rewrite BUG #346

longshang opened this issue Jul 28, 2020 · 11 comments

Comments

@longshang
Copy link

proxy-rewrite 界面设置如下图
image

保存到数据库proxy-rewrite只设置了uri,而host没有设置?导致proxy-rewrite无法正常反代到http://www.webxml.com.cn/WebServices/WeatherWebService.asmx,如下图
image
另外无法对路由设置priority,感觉较为不便。

@juzhiyuan
Copy link
Member

  1. We need a check.
  2. We just hidden the priority for Route.

Thanks!

@juzhiyuan
Copy link
Member

The screenshot above is taken from API request or response?

@longshang
Copy link
Author

上面的屏幕截图来自API请求或响应?

您好,截图不知为什么显示不了,您能否看看QQ群(552030619),上面的截图一个来自Dashboard配置,一个是我截MYSQL的routes表中数据。

@juzhiyuan
Copy link
Member

Please paste the request body here, thanks.

@longshang
Copy link
Author

请在此处粘贴请求正文,谢谢。

GET /KKK/ HTTP/1.1
Host: 192.168.0.252:9080
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Cookie: grafana_session=b0e4aaaf65eb57a6739be699e8885ed9

@juzhiyuan
Copy link
Member

请在此处粘贴请求正文,谢谢。

GET /KKK/ HTTP/1.1
Host: 192.168.0.252:9080
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Cookie: grafana_session=b0e4aaaf65eb57a6739be699e8885ed9

This is not the request body, just open network in Chrome, and right click your target request, then copy the request info by cURL.

@longshang
Copy link
Author

请在此处列出请求正文,谢谢。

GET / KKK / HTTP / 1.1
主机:192.168.0.252:9080
连接:keep-alive
语法:no-cache
缓存控制:no-cache
Upgrade-Insecure-Requests:1
用户代理:Mozilla / 5.0(Windows NT 10.0; WOW64)AppleWebKit / 537.36(KHTML,例如Gecko)Chrome / 84.0.4147.89 Safari / 537.36
接受:text / html,application / xhtml + xml,application / xml; q = 0.9,image / webp,image / apng,/ ; q = 0.8,application / signed-exchange; v = b3; q = 0.9
Accept-Encoding:gzip,deflate
Accept-Language:zh-CN,zh; q = 0.9
Cookie:grafana_session = b0e4aaaf65eb57a6739be699e8885ed9

这不是请求正文,只需在Chrome中打开网络,然后右键单击目标请求,然后通过cURL复制请求信息。

curl 'http://192.168.0.252:9080/KKK/'
-H 'Connection: keep-alive'
-H 'Pragma: no-cache'
-H 'Cache-Control: no-cache'
-H 'Upgrade-Insecure-Requests: 1'
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36'
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9'
-H 'Accept-Language: zh-CN,zh;q=0.9'
-H 'Cookie: grafana_session=b0e4aaaf65eb57a6739be699e8885ed9'
--compressed
--insecure

@longshang
Copy link
Author

请在此处粘贴请求正文,谢谢。

GET /KKK/ HTTP/1.1
Host: 192.168.0.252:9080
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Cookie: grafana_session=b0e4aaaf65eb57a6739be699e8885ed9

This is not the request body, just open network in Chrome, and right click your target request, then copy the request info by cURL.

curl 'http://192.168.0.252:9080/KKK/'
-H 'Connection: keep-alive'
-H 'Pragma: no-cache'
-H 'Cache-Control: no-cache'
-H 'Upgrade-Insecure-Requests: 1'
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36'
-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9'
-H 'Accept-Language: zh-CN,zh;q=0.9'
-H 'Cookie: grafana_session=b0e4aaaf65eb57a6739be699e8885ed9'
--compressed
--insecure ;
curl 'http://192.168.0.252:9080/favicon.ico'
-H 'Connection: keep-alive'
-H 'Pragma: no-cache'
-H 'Cache-Control: no-cache'
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36'
-H 'Accept: image/webp,image/apng,image/,/*;q=0.8'
-H 'Referer: http://192.168.0.252:9080/KKK/'
-H 'Accept-Language: zh-CN,zh;q=0.9'
-H 'Cookie: grafana_session=b0e4aaaf65eb57a6739be699e8885ed9'
--compressed
--insecure

@juzhiyuan
Copy link
Member

emmm Where is the actually data sent to API?

@longshang
Copy link
Author

emmm Where is the actually data sent to API?

是从 IP中的doctor/add 反代到 IP2中doctor/add,大神帮忙看看,我在旧版本Dashboard配置proxy rewrite是可以成功的

@juzhiyuan
Copy link
Member

Please provide your HTTP Request Body, or I have no idea what your data is.

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

No branches or pull requests

2 participants