diff --git a/config-templates/config.php b/config-templates/config.php
index d7486c599e0bcbb580d714f74b5bba9355067402..0bf9def7cd6bd5acb1b0e2835851e6694ad91e64 100644
--- a/config-templates/config.php
+++ b/config-templates/config.php
@@ -553,7 +553,7 @@ $config = [
      * through https. If the user can access the service through
      * both http and https, this must be set to FALSE.
      */
-    'session.cookie.secure' => false,
+    'session.cookie.secure' => true,
 
     /*
      * Set the SameSite attribute in the cookie.
@@ -790,7 +790,7 @@ $config = [
     'language.cookie.name' => 'language',
     'language.cookie.domain' => null,
     'language.cookie.path' => '/',
-    'language.cookie.secure' => false,
+    'language.cookie.secure' => true,
     'language.cookie.httponly' => false,
     'language.cookie.lifetime' => (60 * 60 * 24 * 900),
     'language.cookie.samesite' => $httpUtils->canSetSameSiteNone() ? 'None' : null,