Changes to be committed:
modified: .env.example new file: compta/__pycache__/__init__.cpython-310.pyc new file: compta/__pycache__/admin.cpython-310.pyc new file: compta/__pycache__/apps.cpython-310.pyc new file: compta/__pycache__/models.cpython-310.pyc modified: compta/admin.py new file: compta/categories_indy.py modified: compta/indy.py modified: compta/management/commands/seed_reference.py new file: compta/migrations/0010_categorie_compte_pcg.py modified: compta/models.py modified: compta/templates/compta/base.html new file: compta/templates/compta/gestion.html modified: compta/urls.py new file: compta/views_gestion.py new file: config/__pycache__/__init__.cpython-310.pyc new file: config/__pycache__/settings.cpython-310.pyc modified: config/settings.py modified: entrypoint.sh
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -23,6 +23,17 @@ CSRF_TRUSTED_ORIGINS = [
|
||||
o for o in os.getenv("DJANGO_CSRF_TRUSTED_ORIGINS", "").split(",") if o
|
||||
]
|
||||
|
||||
# Derrière un reverse-proxy (Traefik, Nginx…) qui termine le TLS.
|
||||
# Active-le avec DJANGO_BEHIND_PROXY=1 pour que Django reconnaisse le HTTPS
|
||||
# transmis par le proxy (en-tête X-Forwarded-Proto) et sécurise les cookies.
|
||||
if env_bool("DJANGO_BEHIND_PROXY", False):
|
||||
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
|
||||
USE_X_FORWARDED_HOST = True
|
||||
SESSION_COOKIE_SECURE = True
|
||||
CSRF_COOKIE_SECURE = True
|
||||
# Redirige HTTP -> HTTPS seulement si demandé (laisser 0 si Traefik le fait déjà).
|
||||
SECURE_SSL_REDIRECT = env_bool("DJANGO_SSL_REDIRECT", False)
|
||||
|
||||
INSTALLED_APPS = [
|
||||
"django.contrib.admin",
|
||||
"django.contrib.auth",
|
||||
|
||||
Reference in New Issue
Block a user