@thi.ng/server
Version:
Minimal HTTP server with declarative routing, static file serving and freely extensible via pre/post interceptors
25 lines • 665 B
TypeScript
import type { Interceptor } from "../api";
export interface CacheControlOpts {
maxAge: number;
sMaxAge: number;
noCache: boolean;
noStore: boolean;
noTransform: boolean;
mustRevalidate: boolean;
proxyRevalidate: boolean;
mustUnderstand: boolean;
private: boolean;
public: boolean;
immutable: boolean;
staleWhileRevalidate: boolean;
staleIfError: boolean;
}
/**
* @remarks
* Reference:
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
*
* @param opts
*/
export declare const cacheControl: (opts?: Partial<CacheControlOpts>) => Interceptor;
//# sourceMappingURL=cache-control.d.ts.map