Hi CAP Community,
it looks like access to the Request Headers in Custom Event Handlers does not work as documented. Accessing the Headers via req.headers as documented in the Core Services API returns undefined. I have to fall back to the Express Headers accessible via req._.req.headers.
I have setup an example project to demonstrate the issue.
I guess this is a bug?
Kind regards,
Sebastian
Your environment (run the following commands):
@sap/cds: 4.1.9 @sap/cds-compiler: 1.39.0 @sap/cds-dk: 3.0.0 @sap/cds-foss: 2.0.0 @sap/cds-reflect: 2.13.0 @sap/cds-runtime: 2.3.1 Node.js: v12.16.1 home: /*** removed *** request-headers: 1.0.0 undefined: -- missing --
v12.16.1