浏览代码

HUE-5702 [security] Mark as secure the hueLandingPage cookie if on https

Enrico Berti 8 年之前
父节点
当前提交
90096b2
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      apps/about/src/about/templates/admin_wizard.mako

+ 4 - 1
apps/about/src/about/templates/admin_wizard.mako

@@ -393,7 +393,10 @@ $(document).ready(function(){
   $("#updateSkipWizard").prop('checked', $.cookie("hueLandingPage", {path: "/"}) == "home");
 
   $("#updateSkipWizard").change(function () {
-    $.cookie("hueLandingPage", this.checked ? "home" : "wizard", {path: "/"});
+    $.cookie("hueLandingPage", this.checked ? "home" : "wizard", {
+      path: "/",
+      secure: window.location.protocol.indexOf('https') > -1
+    });
   });
 
 });