From b770e97493f4d7464182024967d861eaa5fb1127 Mon Sep 17 00:00:00 2001 From: Nils Pukropp Date: Sun, 15 Feb 2026 22:09:08 +0100 Subject: [PATCH] updated backend to user tursted hosts too --- .env.example | 5 +++++ backend/entrypoint.sh | 4 ++++ backend/holy_backend/settings.py | 12 ++++++++++++ backend/requirements.txt | 1 + 4 files changed, 22 insertions(+) diff --git a/.env.example b/.env.example index 7a8b482..8a18e92 100644 --- a/.env.example +++ b/.env.example @@ -16,6 +16,11 @@ ALLOWED_HOSTS=localhost,127.0.0.1,backend DEBUG=true +# A comma-separated list of domains that Django will trust for CSRF purposes. +# This should match your frontend domain. +# Example: CSRF_TRUSTED_ORIGINS=https://holy.narl.io,http://localhost:5173 +CSRF_TRUSTED_ORIGINS=http://localhost:5173 + # --- SMTP Configuration --- # Rename this file to .env and fill in your details to enable email sending. diff --git a/backend/entrypoint.sh b/backend/entrypoint.sh index 08a1330..0f0649e 100755 --- a/backend/entrypoint.sh +++ b/backend/entrypoint.sh @@ -7,6 +7,10 @@ set -e echo "Applying database migrations..." python manage.py migrate +# Collect static files +echo "Collecting static files..." +python manage.py collectstatic --no-input + # Create superuser if it doesn't exist echo "Creating superuser..." python manage.py shell <=23.5 markdown>=3.5 Pillow>=10.2.0 drf-spectacular>=0.27.0 +whitenoise>=6.6.0