mirror of
https://github.com/nprasad2077/nbaStats.git
synced 2026-11-19 00:03:51 +00:00
server is running proper!
This commit is contained in:
1 parent
c4ff08279d
commit
b7720ca138
1 file changed
+8
-1
@@ -34,7 +34,7 @@ SECRET_KEY = SECRET_DJANGO
|
|||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
||||||
ALLOWED_HOSTS = []
|
ALLOWED_HOSTS = ['*']
|
||||||
|
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
@@ -43,6 +43,7 @@ INSTALLED_APPS = [
|
|||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
'nba_data',
|
'nba_data',
|
||||||
|
'corsheaders',
|
||||||
'rest_framework',
|
'rest_framework',
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
@@ -51,6 +52,7 @@ INSTALLED_APPS = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
|
'corsheaders.middleware.CorsMiddleware',
|
||||||
'django.middleware.security.SecurityMiddleware',
|
'django.middleware.security.SecurityMiddleware',
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
'django.middleware.common.CommonMiddleware',
|
'django.middleware.common.CommonMiddleware',
|
||||||
@@ -142,3 +144,8 @@ REST_FRAMEWORK = {
|
|||||||
'PAGE_SIZE': 100, # Adjust this value according to the number of records you want to display per page
|
'PAGE_SIZE': 100, # Adjust this value according to the number of records you want to display per page
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CORS_ALLOWED_ORIGINS = [
|
||||||
|
"http://localhost:5173", # Replace this with the origin of your frontend app
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
Reference in new issue
Block a user