Closed scyther closed 5 months ago
/** fastify web framework */ const fastify: FrameworkAdapter = (req, reply) => ({ update: Promise.resolve(req.body), header: req.headers[SECRET_HEADER_LOWERCASE], end: () => reply.status(200).send(), respond: (json) => reply.send(json), unauthorized: () => reply.code(401).send(WRONG_TOKEN_ERROR), });
instead of respond: (json) => reply.send(json) it should be respond: (json) => reply.headers({'content-type': 'application/json'}).send(json)
respond: (json) => reply.send(json)
respond: (json) => reply.headers({'content-type': 'application/json'}).send(json)
I'm surprised that nobody discovered this earlier, thanks for reporting. Could you review #541 and approve it if it is correct?
instead of
respond: (json) => reply.send(json)
it should berespond: (json) => reply.headers({'content-type': 'application/json'}).send(json)