Oak – ctx.assert with custom response headers
Am I doing this wrong? No extra custom headers are being set in the response as far as I can see in cURL:
ctx.assert(
!missingHeaders,
Status.BadRequest,
JSON.stringify({ error: `Required headers missing: ${missingHeaders}` }),
{ expose: true, headers: { "content-type": "application/json", "foo": "bar" } },
);