You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by GitBox <gi...@apache.org> on 2022/10/08 08:35:51 UTC

[GitHub] [shenyu] winneryong opened a new issue, #4046: [Question] Using shenyu-plugin-ratelimiter can't obtain client real ip

winneryong opened a new issue, #4046:
URL: https://github.com/apache/shenyu/issues/4046

   ### Question
   
   ENV: nginx + shenyu-bootstrap
   
   1.Nginx Reverse Proxy, Conf segement :
   location /http {
           proxy_pass http://127.0.0.1:9195/http;
   	proxy_set_header Host $host;
   	proxy_set_header X-Real-IP $remote_addr;
   	proxy_set_header REMOTE-HOST $remote_addr;
   	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
   }
   
   Nginx access log:
   111.204.176.185 - - [08/Oct/2022:14:55:48 +0800] "GET /http/api/mock/search/v1/myip HTTP/1.1" 200 372 "https://example.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36"
   111.204.176.185 - - [08/Oct/2022:15:13:28 +0800] "GET /http/api/mock/search/v1/s?t=domain&q=123213123213 HTTP/1.1" 429 74 "https://example.com/content?index=1&value=123213" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36"
   
   2. ShenYu Rule config:
   ![image](https://user-images.githubusercontent.com/665637/194698274-032adc2f-c5c6-4ba4-8a56-144563cfbb66.png)
   
   3. Redis keys:
   ![image](https://user-images.githubusercontent.com/665637/194698293-c8635118-a321-4b2c-a1d2-4a7f136dbb6a.png)
   
   In redis key , ip part is **127.0.0.1**
   
   
   
   


-- 
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-unsubscribe@shenyu.apache.org.apache.org

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


Re: [I] [Question] Using shenyu-plugin-ratelimiter can't obtain client real ip [shenyu]

Posted by "wushaogen (via GitHub)" <gi...@apache.org>.
wushaogen commented on issue #4046:
URL: https://github.com/apache/shenyu/issues/4046#issuecomment-1838866292

   @yu199195 我也有同样的问题,nginx设置了X-Forwarded-For,但是shenyu-plugin-ratelimiter can't obtain client real ip


-- 
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-unsubscribe@shenyu.apache.org

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


[GitHub] [shenyu] winneryong commented on issue #4046: [Question] Using shenyu-plugin-ratelimiter can't obtain client real ip

Posted by GitBox <gi...@apache.org>.
winneryong commented on issue #4046:
URL: https://github.com/apache/shenyu/issues/4046#issuecomment-1272463497

   > see this : https://shenyu.apache.org/zh/docs/developer/custom-parsing-ip-and-host
   > 
   > this keyName Isn't it up to you to fill out your own?
   
   OK, thanks!
   I thought RemoteAddrKeyResolver could also get the client IP of X-Forwarded-For


-- 
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-unsubscribe@shenyu.apache.org

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


[GitHub] [shenyu] yu199195 commented on issue #4046: [Question] Using shenyu-plugin-ratelimiter can't obtain client real ip

Posted by GitBox <gi...@apache.org>.
yu199195 commented on issue #4046:
URL: https://github.com/apache/shenyu/issues/4046#issuecomment-1272440581

   see this : https://shenyu.apache.org/zh/docs/developer/custom-parsing-ip-and-host


-- 
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-unsubscribe@shenyu.apache.org

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


[GitHub] [shenyu] winneryong closed issue #4046: [Question] Using shenyu-plugin-ratelimiter can't obtain client real ip

Posted by GitBox <gi...@apache.org>.
winneryong closed issue #4046: [Question] Using shenyu-plugin-ratelimiter can't obtain client real ip
URL: https://github.com/apache/shenyu/issues/4046


-- 
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-unsubscribe@shenyu.apache.org

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