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
Ref #519 -- Extend CLI HTTPS support and verbosity
* Enable default support for X-forwarded headers to handle HTTPS redirects.
* Add more error handling to descritive outputs to support user debugging effors.
> When using the `health_check` command, ensure that the host is included in your `ALLOWED_HOSTS` setting.
42
+
> The command automatically uses the first entry from `ALLOWED_HOSTS` for the `X-Forwarded-Host` header if available.
43
+
> For SSL-enabled applications, use the `--forwarded-proto https` flag.
44
+
40
45
Your host name and port may vary depending on your container setup.
41
46
42
47
## Configuration Examples
@@ -80,13 +85,18 @@ spec:
80
85
- name: web
81
86
image: my-django-image:latest
82
87
livenessProbe:
83
-
exec:
84
-
command:
85
-
- python
86
-
- manage.py
87
-
- health_check
88
-
- health_check-container
89
-
- web:8000
88
+
httpGet:
89
+
path: /container/health/
90
+
port: 8000
91
+
httpHeaders:
92
+
- name: X-Forwarded-Proto
93
+
value: https
94
+
- name: X-Forwarded-Host
95
+
value: example.com # Use your actual domain from ALLOWED_HOSTS
90
96
periodSeconds: 60
91
97
timeoutSeconds: 10
92
98
```
99
+
100
+
> [!TIP]
101
+
> Configure `X-Forwarded-Host` to match your domain from `ALLOWED_HOSTS` and set `X-Forwarded-Proto` to `https` if your application enforces SSL.
102
+
> See Django's [USE_X_FORWARDED_HOST](https://docs.djangoproject.com/en/stable/ref/settings/#std-setting-USE_X_FORWARDED_HOST) and [SECURE_PROXY_SSL_HEADER](https://docs.djangoproject.com/en/stable/ref/settings/#secure-proxy-ssl-header) settings.
0 commit comments