Users RBoy and SidV are encountering ActionDispatch::RemoteIp::IpSpoofAttackError logs after upgrading Discourse, with some users reporting inability to post. The error arises when conflicting IP headers (HTTP_CLIENT_IP and HTTP_X_FORWARDED_FOR) are present, which Rails interprets as potential IP spoofing. codinghorror suspects misconfigured networking or proxying, while riking explains that a client-side proxy may be injecting Client-IP, which conflicts with Nginx’s X-Forwarded-For, triggering the error. SidV confirms running multiple Discourse instances behind a single Nginx with custom vhosts, while RBoy insists on a standard single-server setup with no proxies. riking suggests mitigating the issue by clearing the Client-IP header in Nginx using proxy_set_header Client-IP "";. codinghorror emphasizes that from Discourse’s perspective, the network setup is misconfigured — even if it’s client-side proxies causing the issue. The error may block user actions, not just log warnings RBoy. This is not a Discourse bug but a configuration issue requiring alignment of IP headers in the proxy chain.
I’ve got a user sending me mails because he can’t post in the forum.
He said that the forum says “an error occurs” and can’t post messages, or new threads
This is connected with this error log?
My guess is you have something configured incorrectly in your network stack for your Discourse instance? Are either of you doing any weird proxying, or anything deviating from the normal Discourse Docker setup?
It’s probably a client proxy adding Client-IP:, then nginx adds X-Forwarded-For, and rails takes a look and says “okay none of these agree, so I don’t know what to trust, so I may as well throw an error”.
Not sure that that means. It’s a standard hosted install using the Discourse install guide. Single server, single install. No proxying, just a standard NAT firewall with a HTTP/S port forwarding to the discourse VM.
Am wondering could be due to a proxy at the client end?