# Discourse מציג את כתובת ה-IP של השרת/localhost ככתובת ה-IP של המשתמש

**URL:** <https://meta.discourse.org/t/discourse-shows-server-ip-localhost-as-users-ip/232474>\
**Category:** Self-hosting\
**Tags:** unsupported-install\
**Created:** [11 ביולי,‏ 2022,‏ 8:43am UTC](https://meta.discourse.org/t/discourse-shows-server-ip-localhost-as-users-ip/232474 "2022-07-11T08:43:24Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![Fma965](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fma965/32/259795_2.png) [@Fma965](https://meta.discourse.org/u/Fma965)\
**Post date:** [11 ביולי,‏ 2022,‏ 4:53pm UTC](https://meta.discourse.org/t/discourse-shows-server-ip-localhost-as-users-ip/232474/10 "2022-07-11T16:53:06Z")

</div>

Same path as me, my issue was nginx wasn’t configured to take the docker IP as a range to set the realip on.

```plaintext
set_real_ip_from 172.18.0.0/16;
real_ip_header X-Forwarded-For;
real_ip_recursive on;
set_real_ip_from 172.18.0.0/16;

```

So i go User \> Cloudflare \> Server Nginx (SWAG Docker) \> Discourse

```plaintext
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Real-IP $remote_addr;

```

```plaintext
templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
# - "templates/web.ssl.template.yml"
# - "templates/web.letsencrypt.ssl.template.yml"
# - "templates/web.socketed.template.yml"
  - "templates/cloudflare.template.yml"

```

---

_[View the full topic](https://meta.discourse.org/t/discourse-shows-server-ip-localhost-as-users-ip/232474)._
