I am trying to use RoR host filter with an Elasticsearch instance behind an Nginx reverse proxy.
At the moment Elasticsearch is bound to 127.0.0.1 with all traffic passed to it via Nginx.
I set the below HTTP headers and they are being passed through successfully.
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
As far as I can see, RoR is using the OA parameter, as seen in the log files, to do host IP validation which always comes through as 127.0.0.1. Is there a way to use the HTTP headers for IP validation. It would also be nice if the access index didn’t just log the origin as localhost everytime.
Can it be done?