Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions lib/types/server/options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MimosOptions } from '@hapi/mimos';
import { PluginSpecificConfiguration } from '../plugin';
import { RouteOptions } from '../route';
import { CacheProvider, ServerOptionsCache } from './cache';
import { SameSitePolicy } from './state';
import { SameSitePolicy, ServerStateCookieOptions } from './state';

export interface ServerOptionsCompression {
minBytes: number;
Expand Down Expand Up @@ -208,16 +208,7 @@ export interface ServerOptions {
* }
* Sets the default configuration for every state (cookie) set explicitly via server.state() or implicitly (without definition) using the state configuration object.
*/
// TODO I am not sure if I need to use all the server.state() definition (like the default value) OR only the options below. The v16 use "any" here.
// state?: ServerStateCookieOptions;
state?: {
strictHeader?: boolean | undefined;
ignoreErrors?: boolean | undefined;
isSecure?: boolean | undefined;
isHttpOnly?: boolean | undefined;
isSameSite?: SameSitePolicy | undefined;
encoding?: 'none' | 'base64' | 'base64json' | 'form' | 'iron' | undefined;
} | undefined;
state?: ServerStateCookieOptions | undefined;

/**
* @default none.
Expand Down
Loading