dev: allowed cors on environment
This commit is contained in:
parent
7cf1059ba2
commit
5301009568
@ -1,2 +1,3 @@
|
||||
Django==5.0.6
|
||||
djangorestframework
|
||||
django-cors-headers
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user