Django
Add dependency forestadmin-agent-django to your Django app
pip install forestadmin-agent-django# define the forest admin settings
FOREST_AUTH_SECRET = os.environ.get("FOREST_AUTH_SECRET")
FOREST_ENV_SECRET = os.environ.get("FOREST_ENV_SECRET")
# add it in the installed apps
INSTALLED_APPS = [
# ...
"forestadmin.django_agent",
"corsheaders",
# ...
]
# CORS settings
# see https://github.com/adamchainz/django-cors-headers for more details
MIDDLEWARE = [
# ...
# just before CommonMiddleware
"corsheaders.middleware.CorsMiddleware",
"django.middleware.common.CommonMiddleware",
# ...
]
CORS_ALLOWED_ORIGIN_REGEXES = [
r".*\.forestadmin\.com.*",
]
CORS_ALLOW_CREDENTIALS = TrueLast updated