alfhen / vue-cookie

A Vue.js plugin for manipulating cookies
MIT License
822 stars 74 forks source link

getting an extra dot(.) in cookie domain #38

Closed raghu64 closed 6 years ago

raghu64 commented 6 years ago

Hi i have a scenario where i have to create a cookie with the current hostname as domain, but it's adding an extra dot(.) before the hostname.

let domain = location.hostname
window.$cookies.set('name', 'value', '12h', '/', domain)

Ex: expected domain for cookie: abc.google.com actual domain name set in cookie .abc.google.com

Thanks.

casey-lee commented 5 years ago

How were you able to resolve this issue?

casey-lee commented 5 years ago

Got it, don't specify the domain.