add features to products and fix cors settings
This commit is contained in:
@@ -43,11 +43,13 @@ INSTALLED_APPS = [
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
|
||||
'corsheaders',
|
||||
'rest_framework',
|
||||
'content',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
'corsheaders.middleware.CorsMiddleware',
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
@@ -57,6 +59,16 @@ MIDDLEWARE = [
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
]
|
||||
|
||||
# Faqat ma’lum domenlarga ruxsat
|
||||
CORS_ALLOWED_ORIGINS = [
|
||||
"http://localhost:3000", # Next.js dev server
|
||||
"https://firma-plum.vercel.app", # production frontend
|
||||
"https://serenmebel.uz",
|
||||
"https://www.serenmebel.uz",
|
||||
"https://www.maxdi.uz",
|
||||
"https://maxdi.uz",
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'portfolio_admin.urls'
|
||||
|
||||
TEMPLATES = [
|
||||
|
||||
Reference in New Issue
Block a user