You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* basic mixin file
* Add basic check for model type support
* Enhanced documentation for Caddyfile
* Additional documentation around proxy server
* Remove code from other PR
(cherry picked from commit ecc1c93)
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
Copy file name to clipboardExpand all lines: docs/docs/start/config.md
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -156,7 +156,7 @@ Note that in [debug mode](./intro.md#debug-mode), some of the above settings are
156
156
|`INVENTREE_COOKIE_SAMESITE`|`False`| Disable all same-site cookie checks in debug mode |
157
157
|`INVENTREE_SESSION_COOKIE_SECURE`|`False`| Disable secure session cookies in debug mode (allow non-https cookies) |
158
158
159
-
### INVENTREE_COOKIE_SAMESITE vs INVENTREE_SESSION_COOKIE_SECURE
159
+
### Cookie Settings
160
160
161
161
Note that if you set the `INVENTREE_COOKIE_SAMESITE` to `None`, then `INVENTREE_SESSION_COOKIE_SECURE` is automatically set to `True` to ensure that the session cookie is secure! This means that the session cookie will only be sent over secure (https) connections.
162
162
@@ -187,6 +187,11 @@ InvenTree provides support for the [X-Forwarded-Proto](https://developer.mozilla
187
187
188
188
You can also refer to the [Django documentation]({% include "django.html" %}/ref/settings/#use-x-forwarded-host) for more information on this header.
189
189
190
+
Proxy configuration can be complex, and any configuration beyond the basic setup is outside the scope of this documentation. You should refer to the documentation for the specific proxy server you are using.
191
+
192
+
Refer to the [proxy server documentation](./processes.md#proxy-server) for more information.
193
+
194
+
190
195
## Admin Site
191
196
192
197
Django provides a powerful [administrator interface]({% include "django.html" %}/ref/contrib/admin/) which can be used to manage the InvenTree database. This interface is enabled by default, and available at the `/admin/` URL.
Copy file name to clipboardExpand all lines: docs/docs/start/processes.md
+30-5Lines changed: 30 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,12 @@ Further, it provides an authentication endpoint for accessing files in the `/sta
44
44
45
45
Finally, it provides a [Let's Encrypt](https://letsencrypt.org/) endpoint for automatic SSL certificate generation and renewal.
46
46
47
+
### Proxy Functionality
48
+
49
+
#### API and Web Requests
50
+
51
+
All API and web requests are reverse-proxied to the InvenTree django server. This allows the InvenTree web server to be accessed via a standard HTTP/HTTPS port, and allows the proxy server to handle SSL termination.
52
+
47
53
#### Static Files
48
54
49
55
Static files can be served without any need for authentication. In fact, they must be accessible *without* authentication, otherwise the unauthenticated views (such as the login screen) will not function correctly.
@@ -52,15 +58,34 @@ Static files can be served without any need for authentication. In fact, they mu
52
58
53
59
It is highly recommended that the *media* files are served behind an authentication layer. This is because the media files are user-uploaded, and may contain sensitive information. Most modern web servers provide a way to serve files behind an authentication layer.
54
60
55
-
#### Example Configuration
61
+
### Proxy Configuration
62
+
63
+
We provide some *sample* configuration files for getting your proxy server off the ground. The exact setup and configuration of your proxy server will depend on your specific requirements, and the software you choose to use. You may be integrating InvenTree with an existing web server, and the configuration may be different to the provided examples.
64
+
65
+
#### Example Configurations
66
+
67
+
**Caddy**
68
+
69
+
The [docker production example](./docker.md) provides an example using [Caddy](https://caddyserver.com) to serve *static* and *media* files, and redirecting other requests to the InvenTree web server itself. Caddy is a modern web server which is easy to configure and provides a number of useful features, including automatic SSL certificate generation.
70
+
71
+
You can find the sample Caddy configuration [here]({{ sourcefile("contrib/container/Caddyfile") }}).
72
+
73
+
**Nginx**
74
+
75
+
An alternative is to run nginx as the reverse proxy. A sample configuration file is provided [here]({{ sourcefile("contrib/container/nginx.conf") }}).
56
76
57
-
The [docker production example](./docker.md) provides an example using [Caddy](https://caddyserver.com) to serve *static* and *media* files, and redirecting other requests to the InvenTree web server itself.
77
+
#### Extending the Proxy Configuration
58
78
59
-
Caddy is a modern web server which is easy to configure and provides a number of useful features, including automatic SSL certificate generation.
79
+
You may wish to extend the proxy configuration to include additional features, based on your particular requirements. Some examples of where additional configuration may be required include:
60
80
61
-
#### Alternatives to Caddy
81
+
-**Upstream Proxy**: You may be running the InvenTree server behind another proxy server, and need to configure the proxy server to forward requests to the upstream proxy.
82
+
-**Authentication**: You may wish to add an authentication layer to the proxy server, to restrict access to the InvenTree web interface.
83
+
-**SSL Termination**: You may wish to terminate SSL connections at the proxy server, and forward unencrypted traffic to the InvenTree web server.
84
+
-**Load Balancing**: You may wish to run multiple instances of the InvenTree web server, and use the proxy server to load balance between them.
85
+
-**Custom Error Pages**: You may wish to provide custom error pages for certain HTTP status codes.
62
86
63
-
An alternative is to run nginx as the reverse proxy. A sample configuration file is provided in the `./contrib/container/` source directory.
87
+
!!! warning "No Support"
88
+
We do not provide support for configuring your proxy server. The configuration of the proxy server is outside the scope of this documentation. If you require assistance with configuring your proxy server, please refer to the documentation for the specific software you are using.
0 commit comments