fix(nuxt3)!: add default cookie path to `/` (#4019)

This commit is contained in:
Daniel Roe 2022-04-07 12:35:46 +01:00 committed by GitHub
parent 6276580aa4
commit 76eedb852e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -17,6 +17,7 @@ export interface CookieOptions<T=any> extends _CookieOptions {
export interface CookieRef<T> extends Ref<T> {}
const CookieDefaults: CookieOptions<any> = {
path: '/',
decode: val => destr(decodeURIComponent(val)),
encode: val => encodeURIComponent(typeof val === 'string' ? val : JSON.stringify(val))
}