From 95f778c8e60c104f5e544428d16941add75f211f Mon Sep 17 00:00:00 2001 From: David de Boer Date: Tue, 3 Dec 2024 14:54:43 +0100 Subject: [PATCH] fix: @fastify/accepts plugin in reconciliation server (#1474) --- packages/network-of-terms-reconciliation/src/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/network-of-terms-reconciliation/src/server.ts b/packages/network-of-terms-reconciliation/src/server.ts index 1b1c8f52..f8f70f42 100644 --- a/packages/network-of-terms-reconciliation/src/server.ts +++ b/packages/network-of-terms-reconciliation/src/server.ts @@ -39,7 +39,7 @@ export async function server( const server = fastify({logger, trustProxy: config.TRUST_PROXY as boolean}); server.register(fastifyCors); server.register(formBodyPlugin, {parser}); - server.register(fastifyAccepts); + server.register(fastifyAccepts, {decorateReply: true}); server.decorateRequest('root', ''); server.addHook('onRequest', (request, reply, done) => { request.root = request.protocol + '://' + request.hostname;