21 lines
587 B
Python
21 lines
587 B
Python
from .base import *
|
|
import sentry_sdk
|
|
|
|
DEBUG = False
|
|
|
|
ALLOWED_HOSTS = os.environ["ALLOWED_HOSTS"].split(",")
|
|
|
|
CORS_ALLOWED_ORIGINS = os.environ.get("CORS_ALLOWED_ORIGINS", "").split(",")
|
|
|
|
MIDDLEWARE = ["whitenoise.middleware.WhiteNoiseMiddleware"] + MIDDLEWARE
|
|
STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage"
|
|
|
|
SECURE_HSTS_SECONDS = 31536000
|
|
SECURE_HSTS_INCLUDE_SUBDOMAINS = True
|
|
SECURE_SSL_REDIRECT = True
|
|
SESSION_COOKIE_SECURE = True
|
|
CSRF_COOKIE_SECURE = True
|
|
|
|
if dsn := os.environ.get("SENTRY_DSN"):
|
|
sentry_sdk.init(dsn=dsn, traces_sample_rate=0.2)
|