cookie httponly secure

cookie在安全方面,有2个重要属性,一个是httpOnly,一个是secure.

如果给cookie设置了httpOnly属性,那么浏览器的js脚本将不能够读取cookie。

如果给cookie设置了secure属性,那么此cookie只能通过https传递,而不能通过http传递。

参考链接:http://resources.infosecinstitute.com/securing-cookies-httponly-secure-flags/

 tomcat官方对secure的解释。https://www.owasp.org/index.php/SecureFlag

猜你喜欢

转载自wandejun1012.iteye.com/blog/2284513
今日推荐