From 5429354261edc9a9ab71cdb79d17bde4cca165b5 Mon Sep 17 00:00:00 2001 From: Marie PUPO JEAMMET Date: Tue, 10 Jun 2025 17:35:00 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(config)=20whitelist=20kube=20pod?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Whitelist our pod's IP address. Based on Visio's PR https://github.com/suitenumerique/meet/pull/95 --- src/backend/people/settings.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/backend/people/settings.py b/src/backend/people/settings.py index e964ba1..8e68cb2 100755 --- a/src/backend/people/settings.py +++ b/src/backend/people/settings.py @@ -14,6 +14,7 @@ https://docs.djangoproject.com/en/3.1/ref/settings/ import json import os +from socket import gethostbyname, gethostname from django.utils.translation import gettext_lazy as _ @@ -942,7 +943,10 @@ class Production(Base): """ # Security - ALLOWED_HOSTS = values.ListValue(None) + ALLOWED_HOSTS = [ + *values.ListValue([], environ_name="ALLOWED_HOSTS"), + gethostbyname(gethostname()), + ] CSRF_TRUSTED_ORIGINS = values.ListValue([]) SECURE_BROWSER_XSS_FILTER = True SECURE_CONTENT_TYPE_NOSNIFF = True