Skip to content

Commit

Permalink
add support for https proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
Suryansh5545 committed Aug 7, 2023
1 parent 7f3e8fd commit 9add8b7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions settings/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
from sentry_sdk.integrations.django import DjangoIntegration


DEBUG = False

# Email settings if EMAIL_REQUIRED is set to True
if os.environ.get("EMAIL_REQUIRED") == "True":
EMAIL_HOST = os.environ.get("EMAIL_HOST", "email_host")
Expand Down Expand Up @@ -33,6 +35,12 @@
)
}

CORS_ALLOWED_ORIGINS = [
"https://ticketify.tech",
"https://sabrang.ticketify.tech",
"https://staging.ticketify.tech",
]

# S3 Bucket settings
AWS_STORAGE_BUCKET_NAME = getenv("AWS_STORAGE_BUCKET_NAME", "aws_storage_bucket_name")
AWS_ACCESS_KEY_ID = getenv("AWS_ACCESS_KEY_ID", "aws_access_key_id")
Expand All @@ -44,5 +52,7 @@
"staticfiles": {"BACKEND": "storages.backends.s3boto3.S3StaticStorage"}
}

SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")

if os.environ.get("SENTRY_ENABLED") == "True":
sentry_sdk.init(dsn=os.environ.get("SENTRY_DSN") ,integrations=[DjangoIntegration()] ,traces_sample_rate=1.0 ,send_default_pii=True)
2 changes: 2 additions & 0 deletions settings/staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,7 @@
"staticfiles": {"BACKEND": "storages.backends.s3boto3.S3StaticStorage"}
}

SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")

if os.environ.get("SENTRY_ENABLED") == "True":
sentry_sdk.init(dsn=os.environ.get("SENTRY_DSN") ,integrations=[DjangoIntegration()] ,traces_sample_rate=1.0 ,send_default_pii=True)

0 comments on commit 9add8b7

Please sign in to comment.