tzssangglass commented on issue #7522:
URL: https://github.com/apache/apisix/issues/7522#issuecomment-1196427796

   > 按以上配置确实返回200,查看我的路由配置,使用了proxy-rewrite对路由进行了改写,具体配置如下: { "uri": 
"/javatest/_", "name": "测试", "methods": [ "GET", "POST" ], "plugins": { 
"proxy-rewrite": { "regex_uri": [ "/javatest/_", "/" ] } }, "upstream_id": 
"415336969531294748", "labels": { "API_VERSION": "v1.0" }, "status": 1 } 
,关闭log-rotate插件,返回200,日志信息: 10.10.16.129 - - [27/Jul/2022:11:35:53 +0800] 
192.168.68.114:9080 "GET /javatest/firstwork/ HTTP/1.1" 200 63 0.009 "-" 
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like 
Gecko) Chrome/103.0.5060.134 Safari/537.36 Edg/103.0.1264.71" 10.110.3.50:8888 
200 0.009 
"[http://192.168.68.114:9080/firstwork](http://192.168.68.114:9080/firstwork/)" 
,在config.yaml打开log-rotate插件,返回404,日志信息: 10.10.16.129 - - [27/Jul/2022:11:36:54 
+0800] 192.168.68.114:9080 "GET /javatest/firstwork/ HTTP/1.1" 404 727 0.011 
"-" "Mozilla/5.0 (Window
 s NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) 
Chrome/103.0.5060.134 Safari/537.36 Edg/103.0.1264.71" 10.110.3.51:8888 404 
0.011 "http://192.168.68.114:9080";
   > 
   > 
![image](https://user-images.githubusercontent.com/75060224/181155534-27e830cd-c7ab-44d2-9951-8c63f58f2671.png)
 对比faxi发现在打开log-rotate插件后,proxy-rewrite插件重写时丢失了uri
   
   `uri`  in route is `/javatest/`, it wouldn't match the requests which path 
is `/javatest/firstwork/`.
   
   So the routing configuration you listed is not actually associated with the 
request. You can set the log level to info to see which route matches exactly 
from the error log.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to