Fix ALLOWED_HOSTS entries in production settings

Updated ALLOWED_HOSTS to remove the protocol prefix, ensuring compatibility with Django's host validation. This change prevents potential issues with host header mismatches in production environments.
main
Arne Schauf 10 months ago
parent c8eacb2204
commit f1911ab8c9
  1. 2
      feo_homepage/settings/prod.py

@ -4,7 +4,7 @@ from .base import *
DEBUG = False DEBUG = False
TEMPLATE_DEBUG = True TEMPLATE_DEBUG = True
ALLOWED_HOSTS = ["https://www.feo.gmbh", "https://feo.gmbh"] ALLOWED_HOSTS = ["www.feo.gmbh", "feo.gmbh"]
USE_X_FORWARDED_HOST = True USE_X_FORWARDED_HOST = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
CSRF_TRUSTED_ORIGINS = ["https://www.feo.gmbh", "https://feo.gmbh"] CSRF_TRUSTED_ORIGINS = ["https://www.feo.gmbh", "https://feo.gmbh"]

Loading…
Cancel
Save