javascript - GET request with cookies having secure flag set -


i have saved session cookies secure flag set. browser sending cookies every xhr, can see cookies being sent not having security=secure flag set. how can ensure while sending xhr, cookies sent secure flag? (i.e. security=secure)

i can see cookies being sent not having security=secure flag set

that correct. cookie specification requires clients send cookie value in cookie: header, , not metadata (secure, domain, etc). true http requests, xhr or otherwise.

a shortcoming of design can't tell server side cookie set. cookie coming on https://www.example.com/ might have been set http://www.example.com/ without secure flag. have come http://other-subdomain.example.com/, setting domain example.com. there no way know.

about can mitigate possibility of man-in-the-middle attacker using unprotected connection http://www.example.com/ inject cookies https://www.example.com/ use https: exclusively. on http port instead serve redirect https: , set http strict transport security header try prevent browsers connecting http: address in future.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -