How to disable IP Spoofing check in Rails 4 application?

后端 未结 3 892
别那么骄傲
别那么骄傲 2021-02-08 12:54

I\'m getting the following error on my Rails 4 application:

ActionDispatch::RemoteIp::IpSpoofAttackError: IP spoofing attack?! HTTP_CLIENT_IP="xx.xx.xx.

3条回答
  •  自闭症患者
    2021-02-08 13:32

    config.action_dispatch.ip_spoofing_check should work based on the calling chain for RemoteIp.

    You should be able to achieve the same effect by setting config.action_dispatch.trusted_proxies to a regex matching all IPv4 addresses.

提交回复
热议问题