Implementado Https

This commit is contained in:
2024-12-27 08:26:10 -08:00
parent 7f1fc94fc9
commit a77cdf96b9
6 changed files with 48 additions and 1 deletions
+10 -1
View File
@@ -25,7 +25,14 @@ SECRET_KEY = 'django-insecure-os9f6#@x_5*sfv2g6vyj*31$964_s%7(%&x0+m)crrbj^=0wus
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = ['*']
ALLOWED_HOSTS = ['novawow.com', 'www.novawow.com', '95.216.107.200']
SECURE_SSL_REDIRECT = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SECURE_HSTS_SECONDS = 31536000 # Habilita HSTS por 1 año
SECURE_HSTS_INCLUDE_SUBDOMAINS = True
SECURE_HSTS_PRELOAD = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
# Application definition
@@ -38,6 +45,7 @@ INSTALLED_APPS = [
'django.contrib.staticfiles',
'home',
'django_ckeditor_5',
'django_extensions',
]
# Configuración para AC SOAP
@@ -97,6 +105,7 @@ MIDDLEWARE = [
'django.middleware.common.CommonMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'novawow.middleware.SSLRedirectMiddleware',
]
ROOT_URLCONF = 'novawow.urls'