cmp-cc / vue-cookies

A simple Vue.js plugin for handling browser cookies
MIT License
408 stars 70 forks source link

Secure Cookie Not being Set #37

Closed joemaramdocs closed 4 years ago

joemaramdocs commented 4 years ago

Hello i am setting my Cookies like this.on the HTTP/else it is working and setting a cookie while on my HTTPS server its not setting any cookies.

if (window.location.protocol == "https:"){ this.$cookies.set("firstName", "Jer", "1d",window.location.hostname,true); this.$cookies.set("lastName", "Sample", "1d",window.location.hostname,true); this.$cookies.set("companyName", "Sample Comp", "1d",window.location.hostname,true); this.$cookies.set("companyID", "VIP", "1d",window.location.hostname,true); }else{ this.$cookies.set("firstName", "Jer", "1d",window.location.hostname); this.$cookies.set("lastName", "Sample", "1d",window.location.hostname); this.$cookies.set("companyName", "Sample Comp", "1d",window.location.hostname); this.$cookies.set("companyID", "VIP", "1d",window.location.hostname); }

cmp-cc commented 4 years ago

$cookies.set(keyName, value[, expireTimes[, path[, domain[, secure]]]])

this.$cookies.set("firstName", "Jer", "1d","/",window.location.hostname,true);
joemaramdocs commented 4 years ago

its not working :(

joemaramdocs commented 4 years ago

Working now change "/" to null