Skip to content

Commit

Permalink
Merge pull request #16 from Grupo-Syntax-Squad/func/cors-26
Browse files Browse the repository at this point in the history
Func/cors 26
  • Loading branch information
Gabriel4SS authored Sep 28, 2024
2 parents a945c10 + c8f1f4b commit 40a82b4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ python-dotenv==1.0.1
sqlparse==0.5.1
typing_extensions==4.12.2
tzdata==2024.1
drf-spectacular
drf-spectacular
django-cors-headers
6 changes: 6 additions & 0 deletions src/tupan/tupan/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
'estacoes',
'drf_spectacular',
'usuarios',
'corsheaders',
]

REST_FRAMEWORK = {
Expand All @@ -77,6 +78,7 @@
}

MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
Expand All @@ -86,6 +88,10 @@
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

CORS_ALLOWED_ORIGINS = [
'http://localhost:3000',
]

ROOT_URLCONF = 'tupan.urls'

TEMPLATES = [
Expand Down

0 comments on commit 40a82b4

Please sign in to comment.