Verified Commit 95fcfa44 authored by Agate's avatar Agate 💬

CORS settings

parent b4804658
......@@ -83,6 +83,7 @@ THIRD_PARTY_APPS = [
"allauth.account",
"allauth.socialaccount",
"rest_framework",
"corsheaders",
]
LOCAL_APPS = [
"contributions.users.apps.UsersAppConfig",
......@@ -137,6 +138,8 @@ MIDDLEWARE = [
"django.contrib.auth.middleware.AuthenticationMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
"corsheaders.middleware.CorsMiddleware",
"django.middleware.common.CommonMiddleware",
]
# STATIC
......@@ -229,3 +232,11 @@ ACCOUNT_EMAIL_VERIFICATION = "mandatory"
ACCOUNT_ADAPTER = "contributions.users.adapters.AccountAdapter"
# https://django-allauth.readthedocs.io/en/latest/configuration.html
SOCIALACCOUNT_ADAPTER = "contributions.users.adapters.SocialAccountAdapter"
REST_FRAMEWORK = {
"DEFAULT_PAGINATION_CLASS": "rest_framework.pagination.LimitOffsetPagination",
"PAGE_SIZE": 100,
}
CORS_ORIGIN_ALLOW_ALL = True
......@@ -14,3 +14,4 @@ djangorestframework>=3.8,<3.9 # https://github.com/encode/django-rest-framework
psycopg2==2.7.4 --no-binary psycopg2 # https://github.com/psycopg/psycopg2
requests
pendulum
django-cors-headers
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment