Skip to content

Commit

Permalink
fix backend prod mode!
Browse files Browse the repository at this point in the history
  • Loading branch information
lpofredc committed Oct 24, 2024
1 parent e3a085e commit e8c93d2
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions backend/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,5 +258,16 @@
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
INTERNAL_IPS = [ip[: ip.rfind(".")] + ".1" for ip in ips] + ["127.0.0.1", "10.0.2.2"]
else:
SECURE_SSL_REDIRECT = True
CSRF_COOKIE_SECURE = True
SECURE_SSL_REDIRECT = config("SECURE_SSL_REDIRECT", default=False, cast=bool)
SESSION_COOKIE_SECURE = config("SESSION_COOKIE_SECURE", default=True, cast=bool)
CSRF_COOKIE_SECURE = config("CSRF_COOKIE_SECURE", default=True, cast=bool)
LOGGING = {
"version": 1,
"handlers": {
"mail_admins": {
"level": "ERROR",
"class": "django.utils.log.AdminEmailHandler",
"include_html": True,
}
},
}

0 comments on commit e8c93d2

Please sign in to comment.