diff --git a/api/app/settings/production.py b/api/app/settings/production.py index 0cf5a0cb9d2d..ff1738c979d2 100644 --- a/api/app/settings/production.py +++ b/api/app/settings/production.py @@ -4,4 +4,5 @@ # Needed by Elastic Beanstalk to correctly identify incoming protocol # https://docs.aws.amazon.com/elasticloadbalancing/latest/application/x-forwarded-headers.html#x-forwarded-proto -SECURE_PROXY_SSL_HEADER = ("X-Forwarded-Proto", "https") +# Although in our case SSL termination happens in Cloudfront so the header is named as below. +SECURE_PROXY_SSL_HEADER = ("HTTP_CLOUDFRONT_FORWARDED_PROTO", "https")