From 97749e6722a26c2b35ff98c23483b638991c7e72 Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Mon, 25 Sep 2023 02:58:40 +0200 Subject: [PATCH] upd: fix cross origin on file proxy --- packages/backend/src/server/FileServerService.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/backend/src/server/FileServerService.ts b/packages/backend/src/server/FileServerService.ts index 11721263d..e82ef64dc 100644 --- a/packages/backend/src/server/FileServerService.ts +++ b/packages/backend/src/server/FileServerService.ts @@ -61,6 +61,7 @@ export class FileServerService { public createServer(fastify: FastifyInstance, options: FastifyPluginOptions, done: (err?: Error) => void) { fastify.addHook('onRequest', (request, reply, done) => { reply.header('Content-Security-Policy', 'default-src \'none\'; img-src \'self\'; media-src \'self\'; style-src \'unsafe-inline\''); + reply.header('Access-Control-Allow-Origin', '*'); done(); });