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) => Middlewarecorstype
cors: (options?: CorsOptions) => MiddlewareCorsOptionstype
CorsOptions: anycreateCsrfTokentype
createCsrfToken: (secret: string, sessionId: string) => Promise<string>csrftype
csrf: (options: CsrfOptions) => MiddlewareCsrfOptionstype
CsrfOptions: anyenforceHttpstype
enforceHttps: (options?: { trustProxy?: boolean; status?: 301 | 302 | 307 | 308; }) => MiddlewarerateLimittype
rateLimit: (options: RateLimitOptions) => MiddlewareRateLimitOptionstype
RateLimitOptions: anyRateLimitStoretype
RateLimitStore: anyrequestIdtype
requestId: (options?: { header?: string; generate?: () => string; }) => MiddlewareResponseLoggertype
ResponseLogger: anysecurityHeaderstype
securityHeaders: (options?: { contentSecurityPolicy?: string; referrerPolicy?: string; frameOptions?: string; }) => Middlewaretracetype
trace: (start: (context: ServerContext) => void | (() => void | Promise<void>)) => MiddlewareverifyCsrfTokentype
verifyCsrfToken: (secret: string, sessionId: string, token: string) => Promise<boolean>