From 55d767e99dd8594f7b234f93086ce648c605ae6e Mon Sep 17 00:00:00 2001 From: hynsey Date: Sat, 7 Oct 2023 23:01:40 +0100 Subject: [PATCH 1/2] Cookie path and env variables added added cookie path and domain env variables from the flarum.env file propagated to the config.php file --- rootfs/flarum/app/config.php.sample | 5 +++++ rootfs/usr/local/bin/startup | 2 ++ 2 files changed, 7 insertions(+) diff --git a/rootfs/flarum/app/config.php.sample b/rootfs/flarum/app/config.php.sample index 925f43b..cf1f9c1 100644 --- a/rootfs/flarum/app/config.php.sample +++ b/rootfs/flarum/app/config.php.sample @@ -13,6 +13,11 @@ 'prefix' => '', 'strict' => false, ), + 'cookie' => + array ( + 'path' => '', + 'domain' => '', + ), 'url' => '', 'paths' => array ( 'api' => 'api', diff --git a/rootfs/usr/local/bin/startup b/rootfs/usr/local/bin/startup index b8ee399..5493730 100644 --- a/rootfs/usr/local/bin/startup +++ b/rootfs/usr/local/bin/startup @@ -76,6 +76,8 @@ if [ -e '/flarum/app/public/assets/rev-manifest.json' ] || [ -e '/flarum/app/pub -e "s||${DB_PASS}|g" \ -e "s||${DB_PREF}|g" \ -e "s||${DB_PORT}|g" \ + -e "s||${COOKIE_PATH}|g" \ + -e "s||${COOKIE_DOMAIN}|g" \ -e "s||${FORUM_URL}|g" /flarum/app/config.php.sample cp -p /flarum/app/config.php.sample /flarum/app/config.php From fb0332a48b374570e64daece321c3af472de2308 Mon Sep 17 00:00:00 2001 From: hynsey Date: Sun, 8 Oct 2023 01:16:16 +0100 Subject: [PATCH 2/2] Cookie prefs - fixes fixed some formatting and missing config entries --- rootfs/flarum/app/config.php.sample | 3 +-- rootfs/usr/local/bin/startup | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/rootfs/flarum/app/config.php.sample b/rootfs/flarum/app/config.php.sample index cf1f9c1..30c9fa6 100644 --- a/rootfs/flarum/app/config.php.sample +++ b/rootfs/flarum/app/config.php.sample @@ -13,8 +13,7 @@ 'prefix' => '', 'strict' => false, ), - 'cookie' => - array ( + 'cookie' => array ( 'path' => '', 'domain' => '', ), diff --git a/rootfs/usr/local/bin/startup b/rootfs/usr/local/bin/startup index 5493730..37b4bdc 100644 --- a/rootfs/usr/local/bin/startup +++ b/rootfs/usr/local/bin/startup @@ -114,6 +114,8 @@ else -e "s||${DB_PASS}|g" \ -e "s||${DB_PREF}|g" \ -e "s||${DB_PORT}|g" \ + -e "s||${COOKIE_PATH}|g" \ + -e "s||${COOKIE_DOMAIN}|g" \ -e "s||${FLARUM_ADMIN_USER}|g" \ -e "s||${FLARUM_ADMIN_PASS}|g" \ -e "s||${FLARUM_ADMIN_MAIL}|g" \