dev: allowed cors on environment

This commit is contained in:
Mono Mono 2025-02-08 16:21:21 -05:00
parent 7cf1059ba2
commit 5301009568
2 changed files with 6 additions and 2 deletions

View File

@ -1,2 +1,3 @@
Django==5.0.6
djangorestframework
django-cors-headers

View File

@ -25,9 +25,9 @@ SECRET_KEY = 'django-insecure-zh6rinl@8y7g(cf781snisx2j%p^c#d&b2@@9cqe!v@4yv8x=v
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
ALLOWED_HOSTS = ['localhost']
CORS_ALLOWED_ORIGINS = ['http://localhost:3000', 'http://localhost:7001']
# Application definition
INSTALLED_APPS = [
@ -39,6 +39,7 @@ INSTALLED_APPS = [
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'corsheaders',
# 'don_confiao'
]
@ -50,6 +51,8 @@ MIDDLEWARE = [
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django.middleware.common.CommonMiddleware',
]
ROOT_URLCONF = 'tienda_ilusion.urls'