Skip to content

Commit 556ef33

Browse files
authored
Fix infinite redirect on Django settings (GoogleCloudPlatform#7739)
1 parent 3b0d547 commit 556ef33

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

run/django/mysite/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
ALLOWED_HOSTS = [urlparse(CLOUDRUN_SERVICE_URL).netloc]
7676
CSRF_TRUSTED_ORIGINS = [CLOUDRUN_SERVICE_URL]
7777
SECURE_SSL_REDIRECT = True
78+
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
7879
else:
7980
ALLOWED_HOSTS = ["*"]
8081
# [END cloudrun_django_csrf]

0 commit comments

Comments
 (0)