diff --git a/rootfs/flarum/app/config.php.sample b/rootfs/flarum/app/config.php.sample index 4b1d703..be91505 100644 --- a/rootfs/flarum/app/config.php.sample +++ b/rootfs/flarum/app/config.php.sample @@ -13,13 +13,21 @@ 'prefix' => '', 'strict' => false, ), + 'cookie' => array ( + 'path' => '', + 'domain' => '', + ), 'url' => '', 'paths' => array ( 'api' => 'api', 'admin' => 'admin', +<<<<<<< Updated upstream ), 'cookie' => array ( 'path' => '', 'domain' => '', ), +======= + ), +>>>>>>> Stashed changes ); diff --git a/rootfs/usr/local/bin/startup b/rootfs/usr/local/bin/startup index b8ee399..10f7d0b 100644 --- a/rootfs/usr/local/bin/startup +++ b/rootfs/usr/local/bin/startup @@ -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}|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