diff --git a/coldbrew/settings.py b/coldbrew/settings.py index 32af67f..2df040d 100644 --- a/coldbrew/settings.py +++ b/coldbrew/settings.py @@ -32,7 +32,9 @@ if not (FIELD_ENCRYPTION_KEY := CONFIG.get("ColdBrew", "EncryptionKey", fallback CONFIG["ColdBrew"]["EncryptionKey"] = FIELD_ENCRYPTION_KEY ASK.write() -ALLOWED_HOSTS = CONFIG.get("ColdBrew", "AllowedHosts", fallback="*").split(",") +ALLOWED_HOSTS = CONFIG.get("ColdBrew", "Hosts", fallback="*").split(",") + +CSRF_TRUSTED_ORIGINS = [f"https://{host}" for host in ALLOWED_HOSTS if host != "*"] DEBUG = ( CONFIG.getboolean("ColdBrew", "Debug", fallback=False) if ALLOWED_HOSTS else True @@ -50,6 +52,7 @@ INSTALLED_APPS = [ "encrypted_model_fields", "django_otp", "django_otp.plugins.otp_totp", + 'django_otp.plugins.otp_static', "two_factor", "coldbrew.vpn", "coldbrew.users",