From 06bed84b31a571b9aecc08a60f495583cf11c99d Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 17 Jun 2021 13:28:48 +0200 Subject: [PATCH] feat: add env varibale OWNCLOUD_HTTP_COOKIE_SAMESITE (default unset) (#162) --- README.md | 1 + latest/overlay/etc/templates/config.php | 4 ++++ v20.04/overlay/etc/templates/config.php | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/README.md b/README.md index ac4a7f3..a8f238b 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,7 @@ OWNCLOUD_FORWARDED_FOR_HEADERS OWNCLOUD_HASHING_COST OWNCLOUD_HAS_INTERNET_CONNECTION OWNCLOUD_HTACCESS_REWRITE_BASE ${OWNCLOUD_SUB_URL} +OWNCLOUD_HTTP_COOKIE_SAMESITE OWNCLOUD_INTEGRITY_EXCLUDED_FILES OWNCLOUD_INTEGRITY_IGNORE_MISSING_APP_SIGNATURE OWNCLOUD_KNOWLEDGEBASE_ENABLED diff --git a/latest/overlay/etc/templates/config.php b/latest/overlay/etc/templates/config.php index 60c5766..c2aaff3 100644 --- a/latest/overlay/etc/templates/config.php +++ b/latest/overlay/etc/templates/config.php @@ -463,6 +463,10 @@ function getConfigFromEnv() { $config['appstoreurl'] = getenv('OWNCLOUD_APPSTORE_URL'); } + if (getenv('OWNCLOUD_HTTP_COOKIE_SAMESITE') != '') { + $config['http.cookie.samesite'] = getenv('OWNCLOUD_HTTP_COOKIE_SAMESITE'); + } + if (getenv('OWNCLOUD_LOGIN_ALTERNATIVES') != '') { $rows = explode(',', getenv('OWNCLOUD_LOGIN_ALTERNATIVES')); diff --git a/v20.04/overlay/etc/templates/config.php b/v20.04/overlay/etc/templates/config.php index 790403a..855ca6b 100644 --- a/v20.04/overlay/etc/templates/config.php +++ b/v20.04/overlay/etc/templates/config.php @@ -467,6 +467,10 @@ function getConfigFromEnv() { $config['appstoreurl'] = getenv('OWNCLOUD_APPSTORE_URL'); } + if (getenv('OWNCLOUD_HTTP_COOKIE_SAMESITE') != '') { + $config['http.cookie.samesite'] = getenv('OWNCLOUD_HTTP_COOKIE_SAMESITE'); + } + if (getenv('OWNCLOUD_LOGIN_ALTERNATIVES') != '') { $rows = explode(',', getenv('OWNCLOUD_LOGIN_ALTERNATIVES'));