Skip to content

Commit a70c126

Browse files
committed
fix: allow forwarded headers
1 parent 6cbf53d commit a70c126

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

codeforlife/server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ def __init__(
112112
"bind": "0.0.0.0:8080",
113113
"workers": 1 if mode == "celery" else workers,
114114
"worker_class": "uvicorn.workers.UvicornWorker",
115+
"forwarded_allow_ips": "*",
115116
}
116117

117118
if mode == "celery":

codeforlife/settings/django.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ def get_databases():
170170
SECURE_CONTENT_TYPE_NOSNIFF = True
171171
SECURE_BROWSER_XSS_FILTER = True
172172
SECURE_REFERRER_POLICY = "strict-origin-when-cross-origin"
173+
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
173174

174175
# Internationalization
175176
# https://docs.djangoproject.com/en/5.1/topics/i18n/

0 commit comments

Comments
 (0)