logo
  • Start here
  • Episodes
  • Articles
  • Log in
  • Sign up

Forwarding remote IP to Phoenix

Topics:
Analytics
Phoenix

If you're running Phoenix behind an Nginx proxy you may see that your conn.remote_ip is always {127, 0, 0, 1}. That's because Nginx and Phoenix are running on the same host.

There's a standard for forwarding the remote_ip in cases like this and there's an Elixir library to do it. In this episode, we set it up, refactor it to get rid of Elixir 1.5+ deprecation warnings and verify everything is working via ngrok.

Share

Request a free email course
Back to index

No Comments

Log in to leave a comment
Alchemist Camp 2017-2020
Hosted on Digital Ocean
Terms and Conditions