Commit 5210bfb1 authored by Aaron Wells's avatar Aaron Wells Committed by Robert Lyon
Browse files

Make Cookie Consent set the "secure" flag over HTTPS

Bug 1384009

Change-Id: I4b29a6de4d0ccb9970b909adc8382d842cc8a1c8
parent d9af551c
......@@ -13,3 +13,4 @@ Modifications:
- renamed 'style.css' to 'cookieconsent.css' and copied/moved it to htdocs/raw/static/style
- decrease all font-size properties in 'cookieconsent.css' for smaller text (all changes marked with: /*changed*/)
- changed some height and max-height properties in 'cookieconsent.css' (all changes marked with: /*changed*/)
- Set the cookie's "secure" flag if the page is served via HTTPS
\ No newline at end of file
......@@ -927,7 +927,11 @@ var cc =
{
var exdate = new Date();
exdate.setDate(exdate.getDate() + expirydays);
document.cookie = name+'='+value+'; expires='+exdate.toUTCString()+'; path=/'
var newcookie = name+'='+value+'; expires='+exdate.toUTCString()+'; path=/';
if (location.protocol == 'https:') {
newcookie = newcookie + '; secure';
}
document.cookie = newcookie;
},
onremoteconsentgiven: function ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment