mirror of
https://github.com/honojs/hono.git
synced 2024-11-21 18:18:57 +01:00
fix(utils/cookie): partitioned typo in CookieOptions (#3566)
This commit is contained in:
parent
f55dc45a31
commit
3a59d86533
@ -8,9 +8,9 @@ import { decodeURIComponent_ } from './url'
|
||||
export type Cookie = Record<string, string>
|
||||
export type SignedCookie = Record<string, string | false>
|
||||
|
||||
type PartitionCookieConstraint =
|
||||
| { partition: true; secure: true }
|
||||
| { partition?: boolean; secure?: boolean } // reset to default
|
||||
type PartitionedCookieConstraint =
|
||||
| { partitioned: true; secure: true }
|
||||
| { partitioned?: boolean; secure?: boolean } // reset to default
|
||||
type SecureCookieConstraint = { secure: true }
|
||||
type HostCookieConstraint = { secure: true; path: '/'; domain?: undefined }
|
||||
|
||||
@ -25,7 +25,7 @@ export type CookieOptions = {
|
||||
sameSite?: 'Strict' | 'Lax' | 'None' | 'strict' | 'lax' | 'none'
|
||||
partitioned?: boolean
|
||||
prefix?: CookiePrefixOptions
|
||||
} & PartitionCookieConstraint
|
||||
} & PartitionedCookieConstraint
|
||||
export type CookiePrefixOptions = 'host' | 'secure'
|
||||
|
||||
export type CookieConstraint<Name> = Name extends `__Secure-${string}`
|
||||
|
Loading…
Reference in New Issue
Block a user