Changed NGINX suggestions based on response from https://github.com/paperless-ngx/paperless-ngx/issues/3588

r-pufky 2023-06-15 13:59:22 -07:00
parent 1f2a55faaf
commit 2728ea3723

@ -30,19 +30,21 @@ http {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
add_header P3P 'CP=""'; # may not be required in all setups
add_header Referrer-Policy "strict-origin-when-cross-origin";
}
}
}
```
The `PAPERLESS_URL` configuration variable is also required when using a
reverse proxy. Please refer to the [hosting and security](https://docs.paperless-ngx.com/configuration/#hosting-and-security) docs.
reverse proxy; consider setting `USE_X_FORWARD_HOST=true` and `USE_X_FORWARD_PORT=true`. Please refer to the [hosting and security](https://docs.paperless-ngx.com/configuration/#hosting-and-security) docs.
Also read
[this](https://channels.readthedocs.io/en/stable/deploying.html#nginx-supervisor-ubuntu),
towards the end of the section.
Some have found adding the P3P header (`add_header P3P 'CP=""';` see [#817](https://github.com/paperless-ngx/paperless-ngx/issues/817)) works; only [IE and Edge](https://en.wikipedia.org/wiki/P3P) support it.
# Apache
Below is an example of an apache2 conf file that you may customize to fit your environment and needs.