Should the cookie secure
flag be set on websites which are served only through HTTPS?
The Secure attribute tells the browser to only send the cookie if the request is being sent over a secure channel such as HTTPS
Let's say the victim connect to https://example.com
and there is no http://example.com
.
How can an attacker have access to the cookie? I mean if he intercepts the traffic the cookie will be encrypted.