From 55ab7206952d5a4b3c34cb6aa07fdf270896e519 Mon Sep 17 00:00:00 2001 From: Joachim Tingvold Date: Thu, 21 Jul 2016 21:05:24 +0200 Subject: [PATCH 1/2] Be more specific in the documentation regarding ALLOWED_HOSTS. --- docs/configuration/mandatory-settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration/mandatory-settings.md b/docs/configuration/mandatory-settings.md index 07a6d8ede..86deddc78 100644 --- a/docs/configuration/mandatory-settings.md +++ b/docs/configuration/mandatory-settings.md @@ -2,7 +2,7 @@ NetBox's local configuration is held in `netbox/netbox/configuration.py`. An exa ## ALLOWED_HOSTS -This is a list of valid fully-qualified domain names (FQDNs) for the NetBox server. NetBox will not permit write access to the server via any other hostnames. The first FQDN in the list will be treated as the preferred name. +This is a list of valid fully-qualified domain names (FQDNs) that is used to reach the NetBox service. Usually this is the same as the hostname for the NetBox server, but can also be different (e.g. when using a reverse proxy serving the NetBox website under a different FQDN than the hostname of the NetBox server). NetBox will not permit access to the server via any other hostnames (or IP's). The value of this option is also used to set ```CSRF_TRUSTED_ORIGINS```, which restricts ```HTTP POST``` to the same set of hosts (more about this [here](https://docs.djangoproject.com/en/1.9/ref/settings/#std:setting-CSRF_TRUSTED_ORIGINS)). Keep in mind that NetBox, by default, has ```USE_X_FORWARDED_HOST = True``` (in ```netbox/netbox/settings.py```) which means that if you're using a reverse proxy, it's the FQDN used to reach that reverse proxy which needs to be in this list (more about this [here](https://docs.djangoproject.com/en/1.9/ref/settings/#allowed-hosts)). Example: From deda796e422da1ff7566b5363462113d9684e73e Mon Sep 17 00:00:00 2001 From: Joachim Tingvold Date: Fri, 22 Jul 2016 17:41:00 +0200 Subject: [PATCH 2/2] Triple -> single ticks + grammar. --- docs/configuration/mandatory-settings.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration/mandatory-settings.md b/docs/configuration/mandatory-settings.md index 86deddc78..8d96cf3a7 100644 --- a/docs/configuration/mandatory-settings.md +++ b/docs/configuration/mandatory-settings.md @@ -2,7 +2,7 @@ NetBox's local configuration is held in `netbox/netbox/configuration.py`. An exa ## ALLOWED_HOSTS -This is a list of valid fully-qualified domain names (FQDNs) that is used to reach the NetBox service. Usually this is the same as the hostname for the NetBox server, but can also be different (e.g. when using a reverse proxy serving the NetBox website under a different FQDN than the hostname of the NetBox server). NetBox will not permit access to the server via any other hostnames (or IP's). The value of this option is also used to set ```CSRF_TRUSTED_ORIGINS```, which restricts ```HTTP POST``` to the same set of hosts (more about this [here](https://docs.djangoproject.com/en/1.9/ref/settings/#std:setting-CSRF_TRUSTED_ORIGINS)). Keep in mind that NetBox, by default, has ```USE_X_FORWARDED_HOST = True``` (in ```netbox/netbox/settings.py```) which means that if you're using a reverse proxy, it's the FQDN used to reach that reverse proxy which needs to be in this list (more about this [here](https://docs.djangoproject.com/en/1.9/ref/settings/#allowed-hosts)). +This is a list of valid fully-qualified domain names (FQDNs) that is used to reach the NetBox service. Usually this is the same as the hostname for the NetBox server, but can also be different (e.g. when using a reverse proxy serving the NetBox website under a different FQDN than the hostname of the NetBox server). NetBox will not permit access to the server via any other hostnames (or IPs). The value of this option is also used to set `CSRF_TRUSTED_ORIGINS`, which restricts `HTTP POST` to the same set of hosts (more about this [here](https://docs.djangoproject.com/en/1.9/ref/settings/#std:setting-CSRF_TRUSTED_ORIGINS)). Keep in mind that NetBox, by default, has `USE_X_FORWARDED_HOST = True` (in `netbox/netbox/settings.py`) which means that if you're using a reverse proxy, it's the FQDN used to reach that reverse proxy which needs to be in this list (more about this [here](https://docs.djangoproject.com/en/1.9/ref/settings/#allowed-hosts)). Example: