Askr
Generated API snapshot

@askrjs/server/middleware

Exports from the declarations published in @askrjs/server 0.0.3. Signatures are generated from the installed artifact.

  • @askrjs/server/middleware0.0.3

Exports

This entrypoint publishes 15 exports. Use the anchored symbol rows for direct links. Type-only exports are labeled separately from runtime values.

accessLogtype

accessLog: (logger: ResponseLogger) => Middleware

corstype

cors: (options?: CorsOptions) => Middleware

createCsrfTokentype

createCsrfToken: (secret: string, sessionId: string) => Promise<string>

csrftype

csrf: (options: CsrfOptions) => Middleware

enforceHttpstype

enforceHttps: (options?: { trustProxy?: boolean; status?: 301 | 302 | 307 | 308; }) => Middleware

rateLimittype

rateLimit: (options: RateLimitOptions) => Middleware

requestIdtype

requestId: (options?: { header?: string; generate?: () => string; }) => Middleware

securityHeaderstype

securityHeaders: (options?: { contentSecurityPolicy?: string; referrerPolicy?: string; frameOptions?: string; }) => Middleware

tracetype

trace: (start: (context: ServerContext) => void | (() => void | Promise<void>)) => Middleware

verifyCsrfTokentype

verifyCsrfToken: (secret: string, sessionId: string, token: string) => Promise<boolean>