Skip to content
This page View Markdown Open in ChatGPT Open in Claude

Headers

To get the value of requested headers, use g.req.headers.

const req_headers = g.req.headers;

The tenant header of a request of a tenant of a multi-tenant instance. g.req.params.tenantUsername holds the tenant too, also when the request named it in the path (crm::acme).

const tenantUsername = g.req.headers['x-am-tenant-username']; // 'acme'