資安防護設定相關文章:
1.Apache2 啟用 mod_headers.so
$sudo a2enmod headers
2.編輯default-ssl.conf, 設定 HttpOnly;Secure;XSRF
$sudo nano /etc/apache2/sites-available/default-ssl.conf
加入
# HttpOnly;Secure;XSRF
Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure;SameSite=strict
3.重啟 Apache2
$sudo service apache2 restart
4.如何檢測是否設定成功
假設該網站為https://www.example.com
$curl -I https://www.example.com
沒有留言:
張貼留言