Skip to content

Commit

Permalink
Fix: CORS error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
elaus00 committed May 27, 2024
1 parent 47c64be commit 5339c9d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion pure_plate/pure_plate/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,15 @@
'account',
'restaurant',
'review',
'favorite'
'favorite',
'corsheaders'


]

MIDDLEWARE = [
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
Expand Down Expand Up @@ -170,3 +173,10 @@
},
}

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


0 comments on commit 5339c9d

Please sign in to comment.