diff --git a/.env.example b/.env.example index 11637fd..1a3145a 100644 --- a/.env.example +++ b/.env.example @@ -20,3 +20,4 @@ BAMBU_PASSWORD=your_password # DEBUG=True # DJANGO_SECRET_KEY=change-me-to-a-random-string # ALLOWED_HOSTS=localhost,127.0.0.1 +# CSRF_TRUSTED_ORIGINS="https://bambu-run.example.com,http://bambu-run.example.com" diff --git a/standalone/settings.py b/standalone/settings.py index 4c2aac0..8f8c1e0 100644 --- a/standalone/settings.py +++ b/standalone/settings.py @@ -111,6 +111,8 @@ PRINTER_IP = os.environ.get("PRINTER_IP", "") ACCESS_TOKEN = os.environ.get("ACCESS_TOKEN", "") PRINTER_SERIAL = os.environ.get("PRINTER_SERIAL", "") +CSRF_TRUSTED_ORIGINS = os.environ.get("CSRF_TRUSTED_ORIGINS", "").split(",") + # Logging LOGGING = { "version": 1,