# Too Many Requests

**URL:** <https://meta.discourse.org/t/too-many-requests/181802>\
**Category:** Support\
**Created:** [March 3, 2021, 4:38pm UTC](https://meta.discourse.org/t/too-many-requests/181802 "2021-03-03T16:38:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![yerttle](https://avatars.discourse-cdn.com/v4/letter/y/58f4c7/32.png) [@yerttle](https://meta.discourse.org/u/yerttle)\
**Post date:** [March 3, 2021, 4:38pm UTC](https://meta.discourse.org/t/too-many-requests/181802/1 "2021-03-03T16:38:50Z")

</div>

Hi there, I have built a wrapper for your forum API so we can securely get people to post forum messages from our APP without out having to include API keys etc in the APP.

Is there a header I can pass to the API so that requests appear to come from the orginating client I have tried `X-Forwarded-For` but don’t seem to have had much luck.

Thanks

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [March 3, 2021, 4:48pm UTC](https://meta.discourse.org/t/too-many-requests/181802/2 "2021-03-03T16:48:29Z")

</div>

See [Last IP address and action\_dispatch.trusted\_proxies - #3 by mpalmer](https://meta.discourse.org/t/last-ip-address-and-action-dispatch-trusted-proxies/50098/3)

Something like this:

```plaintext
    # This is the magic to get IP numbers transmitted to Discourse
    # See https://meta.discourse.org/t/last-ip-address-and-action-dispatch-trusted-proxies/50098/3?u=pfaffman
    - replace:
        filename: /etc/nginx/conf.d/discourse.conf
        from: "types {"
        to: |
          set_real_ip_from 192.168.1.0/24;
          set_real_ip_from 172.19.0.0/24;
          set_real_ip_from 172.18.0.0/24;
          set_real_ip_from 172.17.0.0/24;
          set_real_ip_from 38.242.7.193/28;
          real_ip_recursive on;
          real_ip_header X-Forwarded-For;
          types {

```

---

<div class="post-metadata">

**Author:** ![yerttle](https://avatars.discourse-cdn.com/v4/letter/y/58f4c7/32.png) [@yerttle](https://meta.discourse.org/u/yerttle)\
**Post date:** [March 3, 2021, 5:12pm UTC](https://meta.discourse.org/t/too-many-requests/181802/3 "2021-03-03T17:12:14Z")

</div>

Thanks Jay, will take a look.

---

<div class="post-metadata">

**Author:** ![yerttle](https://avatars.discourse-cdn.com/v4/letter/y/58f4c7/32.png) [@yerttle](https://meta.discourse.org/u/yerttle)\
**Post date:** [March 18, 2021, 11:24am UTC](https://meta.discourse.org/t/too-many-requests/181802/4 "2021-03-18T11:24:13Z")

</div>

Appologies if I am not being smart here but is some able to explain this in more detail.

I have found `/etc/nginx/conf.d/discourse.conf` in the container but it is my understanding that it is created dynamically so making changes from within the container won’t persist restarts. I’ve also found `./config/discourse.conf` which has my settings in so I assume I am supposed to add the settings above into that file but again `./config` is not persisted.

A gentle nudge in the right direction would be much appreciated.

Thanks

---

<div class="post-metadata">

**Author:** ![yerttle](https://avatars.discourse-cdn.com/v4/letter/y/58f4c7/32.png) [@yerttle](https://meta.discourse.org/u/yerttle)\
**Post date:** [March 22, 2021, 9:15am UTC](https://meta.discourse.org/t/too-many-requests/181802/5 "2021-03-22T09:15:05Z")

</div>

Any chance some one can point me in the direction.

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [March 22, 2021, 6:23pm UTC](https://meta.discourse.org/t/too-many-requests/181802/6 "2021-03-22T18:23:28Z")

</div>

The example I provided above shows how to make changes to `discourse.conf` when a new container is built.
