1
0
mirror of https://github.com/myvesta/vesta.git synced 2025-03-12 04:35:23 -07:00

Enabling session.cookie_httponly and session.cookie_secure in myvesta php-fpm

This commit is contained in:
myvesta 2021-09-01 00:33:16 +02:00 committed by GitHub
parent ab9c10b05c
commit 3b287934c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -23,6 +23,18 @@ fi
echo "1" > /usr/local/vesta/data/upgrades/show_changelog
chmod a=rw /usr/local/vesta/data/upgrades/show_changelog
# Enabling session.cookie_httponly and session.cookie_secure in myvesta php-fpm
if [ ! -f "/usr/local/vesta/data/upgrades/enable_cookie_httponly" ]; then
touch /usr/local/vesta/data/upgrades/enable_cookie_httponly
check_grep=$(grep -c 'cookie_httponly' /usr/local/vesta/php/etc/php-fpm.conf)
if [ "$check_grep" -eq 0 ]; then
echo "== Enabling session.cookie_httponly and session.cookie_secure in myvesta php-fpm"
echo "php_admin_flag[session.cookie_httponly] = on" >> /usr/local/vesta/php/etc/php-fpm.conf
echo "php_admin_flag[session.cookie_secure] = on" >> /usr/local/vesta/php/etc/php-fpm.conf
systemctl restart vesta
fi
fi
# Enabling TLS for ProFTPD FTPS
if [ ! -f "/usr/local/vesta/data/upgrades/enable-tls-in-proftpd" ]; then
if [ -f "/etc/proftpd/proftpd.conf" ]; then