From bb28fee54ad0eba2072b7150c0a6bd64f2fc6f48 Mon Sep 17 00:00:00 2001 From: nprasad2077 <114438461+nprasad2077@users.noreply.github.com> Date: Tue, 2 May 2023 17:15:50 -0500 Subject: [PATCH] cors changes --- nba_stats/settings.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nba_stats/settings.py b/nba_stats/settings.py index eddbc05..202a77a 100644 --- a/nba_stats/settings.py +++ b/nba_stats/settings.py @@ -154,9 +154,10 @@ REST_FRAMEWORK = { 'PAGE_SIZE': 100, } -CORS_ALLOWED_ORIGINS = [ - "*", # Replace this with the origin of your frontend app -] +CORS_ALLOWED_ORIGINS = [ 'http://localhost:5173',] + +CORS_ALLOW_ALL_ORIGINS = True + # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/4.2/howto/static-files/