setDebugHeader
setDebugHeader(
c,name,value):void
Defined in: src/policies/sdk/helpers.ts:146
Set a debug header value for client-requested debug output.
Policies call this to contribute debug data. The value is only stored
if the client requested it via the x-stoma-debug request header AND
the gateway has debug headers enabled. When neither condition is met,
this is a no-op (single Map lookup).
Parameters
Section titled “Parameters”Context
Hono request context.
string
Header name (e.g. "x-stoma-cache-key").
Header value. Numbers and booleans are stringified.
string | number | boolean
Returns
Section titled “Returns”void
Example
Section titled “Example”setDebugHeader(c, "x-stoma-cache-key", key);setDebugHeader(c, "x-stoma-cache-ttl", resolved.ttlSeconds);