Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
How to set X-Forwarded-For with nginx plugin?
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to set X-Forwarded-For with nginx plugin? (Read 1172 times)
baz
Jr. Member
Posts: 52
Karma: 1
How to set X-Forwarded-For with nginx plugin?
«
on:
January 13, 2023, 06:22:50 am »
I am trying to integrate seafile, and one of the config requirements under `server` is to set `X-Forwarded-For` like so:
```
server {
proxy_set_header X-Forwarded-For $remote_addr;
}
```
When I check the config generated by the ngnix plugin here at `/usr/local/etc/nginx/nginx.conf`I am unable to find the setting under `server` and I am unsure where in the GUI to find it.
Any ideas?
Logged
Fright
Hero Member
Posts: 1777
Karma: 164
Re: How to set X-Forwarded-For with nginx plugin?
«
Reply #1 on:
January 13, 2023, 07:32:57 am »
plugin adds this header at the Location context
https://github.com/opnsense/plugins/blob/09ca8eec2401988ec72ae4c2f80fa623c4e8d12f/www/nginx/src/opnsense/service/templates/OPNsense/Nginx/location.conf#L164
Logged
baz
Jr. Member
Posts: 52
Karma: 1
Re: How to set X-Forwarded-For with nginx plugin?
«
Reply #2 on:
January 13, 2023, 05:41:57 pm »
Thank you.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
How to set X-Forwarded-For with nginx plugin?