Skip to content

authResponseMeta

authResponseMeta<TOpts, TMeta>(responseMeta?): (opts) => TMeta

The responseMeta to pass to tRPC’s handler: yours (or none). On every response that handed out a CSRF token it drops these headers yours returns: Cache-Control, Surrogate-Control, CDN-Cache-Control and every *-CDN-Cache-Control, X-Accel-Expires and Edge-Control, so the call’s Cache-Control: no-store stays. A proxy-specific cache header outside this list is not touched; keep such rules off the token route.

createHTTPHandler({ router, createContext, responseMeta: authResponseMeta(myResponseMeta) });

TOpts extends object

TMeta extends ResponseMeta = ResponseMeta

(opts) => TMeta

(opts) => TMeta