Skip to content

Fix Google SSO redirect_uri on internal.flagsmith.com #7282

@germangarces

Description

@germangarces

Google rejects the OAuth flow because Django generates redirect_uri=http://internal.flagsmith.com/.... Root cause: Django's SECURE_PROXY_SSL_HEADER_NAME is set to HTTP_CLOUDFRONT_FORWARDED_PROTO, but internal.flagsmith.com goes ALB → ECS with no CloudFront in the path, so the header isn't present and Django falls back to http.

Fix is to trust the standard X-Forwarded-Proto header, which both ALBs set. This requires the public ALB's listener to be HTTPS so CloudFront→ALB doesn't stamp http, overriding CloudFront's value.

Changes

  • (infra): Promote public ALB listener to HTTPS
  • (infra): Switch CloudFront origin protocol to HTTPS
  • (app): Flip SECURE_PROXY_SSL_HEADER_NAME to HTTP_X_FORWARDED_PROTO in admin-api task def

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions