Reference

ServerActionHandlerOptions

Security and validation options for createServerActionHandler.

Signature

interface ServerActionHandlerOptions

Members

allowedActions?: readonly ServerActionRequestReference[]
allowedOrigins?: readonly string[] | "any"
authorize?: (request: Request, reference: ServerActionRequestReference, args: unknown[]): ServerActionValidationResult | Promise<ServerActionValidationResult>
csrf?: boolean | { cookieName?: string; headerName?: string }
maxBodyBytes?: number
replayProtection?: { headerName?: string; seen: ServerActionReplayStore }