diff --git a/plantdb/settings.py b/plantdb/settings.py index fd929d6..d88105d 100644 --- a/plantdb/settings.py +++ b/plantdb/settings.py @@ -70,3 +70,7 @@ MEDIA_ROOT = BASE_DIR / 'media' DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' PERENUAL_API_KEY = os.environ.get('PERENUAL_API_KEY', '') + +_trusted = os.environ.get('CSRF_TRUSTED_ORIGINS', '') +if _trusted: + CSRF_TRUSTED_ORIGINS = [o.strip() for o in _trusted.split(',')]