documentation/content/developer/reference
Julien Castiaux 0055c3e482 [IMP] developer/reference/cli: --proxy-mode
Many customers struggle with their web server configuration, notably
regarding the `--proxy-mode` option and the way `X-Forwarded-*` HTTP
request headers are interpreted within Odoo.

The `--proxy-mode` section has been updated to cover the most common
misunderstandings and to give guidances on how to setup a web server.

Odoo always only takes the last entry of the `X-Forwarded-*` request
header because there are situations where it is not possible to
determine which last n-th entry to use. Employees might access their
odoo database via the internal network: connecting directly to nginx,
while customers might access the database via an additional proxy such
as cloudflare. The real IP of employees would be the last inside the
`X-Forwarded-For` chain, while the real IP of customers would be the
*second* last entry inside the chain. It would be incorrect to always
take the same nth last entry inside the chain. The cloudflare's own IP
address must be discarded from the chain. Web servers usually feature
a way to ignore trusted IP from the chain, a way so that the real IP
of the user is always the last entry inside the chain. Odoo relies on
such feature to be active and configured.

Prior discussions about `X-Forwarded-For`:
* 
* 
* 

All `X-Forwarded-*` headers are ignored in case the `X-Forwarded-Host`
header is missing (even with `--proxy-mode`). System admin might be
tempted to not set this header and to set `Host` instead, this is
broken as this a user-agent would be able to spoof `X-Forwarded-Host`
and Odoo would use that instead of the correct `Host`.

Prior discussions about `X-Forwarded-Host`:
* 
* 

closes 

X-original-commit: 3d91c57b57
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
2023-12-03 08:27:03 +00:00
..
backend [FIX] dev/reference: Fix external reference 2023-11-17 17:56:59 +00:00
external_api [MOV] developer/api/external_api: move "External API" to the reference dir 2023-02-23 16:09:00 +01:00
extract_api [IMP] extract_api: document the new API version 2023-11-03 11:29:09 +00:00
frontend [FW][FIX] reference/owl_components: fix typo 2023-08-11 19:16:02 +02:00
standard_modules [ADD] developer: add _get_available_tokens 2023-03-21 19:54:31 +01:00
user_interface [IMP] scss: update, improve preexisting content 2023-01-13 17:33:02 +01:00
backend.rst [ADD] developer/reference: add a reference page on performance 2022-10-06 18:01:00 +02:00
cli.rst [IMP] developer/reference/cli: --proxy-mode 2023-12-03 08:27:03 +00:00
external_api.rst [FW][ADD] rpc: Go examples 2023-07-14 12:08:05 +02:00
extract_api.rst [IMP] extract_api: document the new API version 2023-11-03 11:29:09 +00:00
frontend.rst [IMP] create JavaScript howtos 2023-04-05 13:57:53 +02:00
standard_modules.rst [ADD] reference/standard_modules: API reference for the payment engine 2022-10-09 09:11:46 +02:00
user_interface.rst [IMP] scss: update, improve preexisting content 2023-01-13 17:33:02 +01:00