Cookie settings implemented

2 new cookie settings implemented in the config.php.sample and startup files. The flarum.env file documented will require updating to reflect also.
pull/125/head
hynsey 2023-10-06 00:14:17 +01:00
parent 502acb8eb2
commit 7aa1b0f9d5
2 changed files with 20 additions and 0 deletions

View File

@ -13,13 +13,21 @@
'prefix' => '<DB_PREF>',
'strict' => false,
),
'cookie' => array (
'path' => '<COOKIE_PATH>',
'domain' => '<COOKIE_DOMAIN>',
),
'url' => '<FORUM_URL>',
'paths' => array (
'api' => 'api',
'admin' => 'admin',
<<<<<<< Updated upstream
),
'cookie' => array (
'path' => '<COOKIE_PATH>',
'domain' => '<COOKIE_DOMAIN>',
),
=======
),
>>>>>>> Stashed changes
);

View File

@ -11,6 +11,16 @@ if [ -z "${FORUM_URL}" ]; then
exit 1
fi
if [ -z "${COOKIE_PATH}" ]; then
echo "[ERROR] Cookie path must be set !"
exit 1
fi
if [ -z "${COOKIE_DOMAIN}" ]; then
echo "[ERROR] Cookie domain must be set !"
exit 1
fi
CACHE_DIR=/flarum/app/extensions/.cache
LIST_FILE=/flarum/app/extensions/list
@ -76,6 +86,8 @@ if [ -e '/flarum/app/public/assets/rev-manifest.json' ] || [ -e '/flarum/app/pub
-e "s|<DB_PASS>|${DB_PASS}|g" \
-e "s|<DB_PREF>|${DB_PREF}|g" \
-e "s|<DB_PORT>|${DB_PORT}|g" \
-e "s|<COOKIE_PATH>|${COOKIE_PATH}|g" \
-e "s|<COOKIE_DOMAIN>|${COOKIE_DOMAIN}|g" \
-e "s|<FORUM_URL>|${FORUM_URL}|g" /flarum/app/config.php.sample
cp -p /flarum/app/config.php.sample /flarum/app/config.php