Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Add CSRF trusted origins setting (#598)
Madison Swain-Bowden213773a4c32e
diff --git a/api/catalog/settings.py b/api/catalog/settings.pyindex 7a925bbc9..234cd6581 100644--- a/api/catalog/settings.py+++ b/api/catalog/settings.py@@ -317,6 +317,10 @@ if config("IS_PROXIED", default=True, cast=bool):# https://docs.djangoproject.com/en/4.0/ref/settings/#secure-proxy-ssl-headerSECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")+# Trusted origins for CSRF+# https://docs.djangoproject.com/en/4.0/releases/4.0/#csrf-trusted-origins-changes-4-0+CSRF_TRUSTED_ORIGINS = ["https://*.openverse.engineering"]+SENTRY_DSN = config("SENTRY_DSN",default="https://[email protected]/6107216",