mirror of https://github.com/nuxt/nuxt.git
fix(nuxt3)!: add default cookie path to `/` (#4019)
This commit is contained in:
parent
6276580aa4
commit
76eedb852e
|
@ -17,6 +17,7 @@ export interface CookieOptions<T=any> extends _CookieOptions {
|
||||||
export interface CookieRef<T> extends Ref<T> {}
|
export interface CookieRef<T> extends Ref<T> {}
|
||||||
|
|
||||||
const CookieDefaults: CookieOptions<any> = {
|
const CookieDefaults: CookieOptions<any> = {
|
||||||
|
path: '/',
|
||||||
decode: val => destr(decodeURIComponent(val)),
|
decode: val => destr(decodeURIComponent(val)),
|
||||||
encode: val => encodeURIComponent(typeof val === 'string' ? val : JSON.stringify(val))
|
encode: val => encodeURIComponent(typeof val === 'string' ? val : JSON.stringify(val))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue