diff --git a/Deployment/Test/docker-compose.yml b/Deployment/Test/docker-compose.yml index 6f46a18..dfc0310 100644 --- a/Deployment/Test/docker-compose.yml +++ b/Deployment/Test/docker-compose.yml @@ -12,6 +12,7 @@ services: environment: - ALLOWED_HOSTS=internal.security - CSRF_TRUSTED_ORIGINS=internal.security + - SESSION_COOKIE_SECURE=False - IP_RATE_LIMIT_TIME=1 # rate limit doesn't work in docker networking therefore disable it nginx: diff --git a/clubhaus/clubhaus/settings.py b/clubhaus/clubhaus/settings.py index 913d1b0..b3dea6f 100644 --- a/clubhaus/clubhaus/settings.py +++ b/clubhaus/clubhaus/settings.py @@ -73,7 +73,7 @@ if csrf_origins := os.getenv("CSRF_TRUSTED_ORIGINS"): WSGI_APPLICATION = 'clubhaus.wsgi.application' -SESSION_COOKIE_SECURE = True +SESSION_COOKIE_SECURE = os.getenv("SESSION_COOKIE_SECURE", "False") == "True" # Database # https://docs.djangoproject.com/en/4.0/ref/settings/#databases diff --git a/clubhaus/homepage/templates/homepage/events.html b/clubhaus/homepage/templates/homepage/events.html index f43dd6b..0cd3bee 100644 --- a/clubhaus/homepage/templates/homepage/events.html +++ b/clubhaus/homepage/templates/homepage/events.html @@ -20,10 +20,10 @@ const timerId = countdown( function (ts) { - document.getElementById("timerDays").textContent = ts.days; - document.getElementById("timerHours").textContent = ts.hours; - document.getElementById("timerMinutes").textContent = ts.minutes; - document.getElementById("timerSeconds").textContent = ts.seconds; + document.getElementById("timerDays").textContent = ts.days || "00"; + document.getElementById("timerHours").textContent = ts.hours || "00"; + document.getElementById("timerMinutes").textContent = ts.minutes || "00"; + document.getElementById("timerSeconds").textContent = ts.seconds || "00"; }, new Date("{{ next_event.date.isoformat }}"), countdown.DAYS | countdown.HOURS | countdown.MINUTES | countdown.SECONDS); diff --git a/clubhaus/homepage/templates/homepage/tobacco.html b/clubhaus/homepage/templates/homepage/tobacco.html index 0ab4404..4e4e4ae 100644 --- a/clubhaus/homepage/templates/homepage/tobacco.html +++ b/clubhaus/homepage/templates/homepage/tobacco.html @@ -25,6 +25,9 @@ {% for tobacco in tobaccos %}