一些些的code、一點點的Life,這就是生活。
請參考:HttpOnly – HTTP Headers 的資安議題 (3)
-Cookie without SameSite attribute.
When cookies lack the SameSite attribute, Web browsers may apply different and sometime
上面的問題其實都可以用一行搞定
setcookie('cross-site-cookie', 'name', ['samesite' => 'Strict', 'secure' => true, 'httponly' =>true]);
你就可以在你的登入頁面上看到下圖
當然這邊有個要注意的是secure 這個屬性,你的網站要有HTTPS再開啟,如果沒有的話是沒有用的
會出現如下圖這樣多冒出一個驚嘆號
一個不務正業,甚麼科技產品都玩的網路宅宅。 If you want to find me,that's easy! I will always on the Internet. so just find me, follow me. I will show you everything fun.