🐛(config) whitelist kube pod

Whitelist our pod's IP address. Based on Visio's PR
https://github.com/suitenumerique/meet/pull/95
This commit is contained in:
Marie PUPO JEAMMET
2025-06-10 17:35:00 +02:00
committed by Marie
parent 86c98cc426
commit 5429354261

View File

@@ -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