I had to add this:

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 127.0.0.1

to config, but overall it’s very useful article.