FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 9a257009 authored by Mike Knee's avatar Mike Knee
Browse files

Merge branch 'dev-fix-cors' into 'main'

Update CORS settings to allow for recaptcha token to be provided in headers

See merge request !102
parents 0c911b42 c5e47745
No related branches found
No related tags found
1 merge request!102Update CORS settings to allow for recaptcha token to be provided in headers
Pipeline #699537 passed
......@@ -4,6 +4,7 @@ from datetime import timedelta
import externalsettings
import structlog
from corsheaders.defaults import default_headers
from api.versions import AVAILABLE_VERSIONS
......@@ -72,6 +73,7 @@ INSTALLED_APPS = [
"django_filters",
"drf_spectacular",
"rest_framework",
"corsheaders",
"knox",
"activate_account",
"api",
......@@ -230,6 +232,7 @@ SPECTACULAR_SETTINGS = {
# Allow all origins to access API.
CORS_URLS_REGEX = r"^.*$"
CORS_ORIGIN_ALLOW_ALL = True
CORS_ALLOW_HEADERS = (*default_headers, "X-Recaptcha-Token")
SWAGGER_SETTINGS = {
# Describe token authentication in swagger definition
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment