-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
helia-http-gateway/src/index.ts
Lines 298 to 317 in b4531c0
| if ([ECHO_HEADERS].includes(true)) { | |
| app.addHook('onRequest', async (request, reply) => { | |
| if (ECHO_HEADERS) { | |
| log('fastify hook onRequest: echoing headers:') | |
| Object.keys(request.headers).forEach((headerName) => { | |
| log('\t %s: %s', headerName, request.headers[headerName]) | |
| }) | |
| } | |
| }) | |
| app.addHook('onSend', async (request, reply, payload) => { | |
| if (ECHO_HEADERS) { | |
| log('fastify hook onSend: echoing headers:') | |
| const responseHeaders = reply.getHeaders() | |
| Object.keys(responseHeaders).forEach((headerName) => { | |
| log('\t %s: %s', headerName, responseHeaders[headerName]) | |
| }) | |
| } | |
| return payload | |
| }) |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels