Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

318
Vistas
Secure_ssl_redirect setting for django does nothing on heroku

I am deploying a Django app on heroku and trying to force https on all pages. I use the following settings for that:

SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

Now when I visit www.mysite.de it does in fact not redirect me to https. Any ideas what I am missing?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Try adding the following to your settings.py:

PREPEND_WWW = True
BASE_URL = "https://www.mysite.de"
ALLOWED_HOSTS = ['www.mysite.de', 'mysite.de']

Make sure you also have SecurityMiddleware and CommonMiddleware enabled.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda