From fda5147d063b7c9ec59d4c347442f8dd2b4b48c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?= <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Sat, 16 Dec 2023 13:23:25 +0900 Subject: [PATCH] =?UTF-8?q?fix(dev):=20=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E3=81=AE=E8=AA=AD=E3=81=BF=E8=BE=BC=E3=81=BF=E3=81=AB?= =?UTF-8?q?=E5=A4=B1=E6=95=97=E3=81=99=E3=82=8B=E3=81=93=E3=81=A8=E3=81=8C?= =?UTF-8?q?=E3=81=82=E3=82=8B=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3=20(#1268?= =?UTF-8?q?4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * (enhance) コード入力をMkCodeEditorに変更 * (fix) devでファイルの読み込みに失敗することがある * Revert "(enhance) コード入力をMkCodeEditorに変更" This reverts commit 726d56c3e962680efc5b5a166e2210d09730341f. --- packages/backend/src/server/FileServerService.ts | 3 +++ packages/frontend/src/index.html | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/server/FileServerService.ts b/packages/backend/src/server/FileServerService.ts index 11721263d..0c7fc8cef 100644 --- a/packages/backend/src/server/FileServerService.ts +++ b/packages/backend/src/server/FileServerService.ts @@ -61,6 +61,9 @@ 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\''); + if (process.env.NODE_ENV === 'development') { + reply.header('Access-Control-Allow-Origin', '*'); + } done(); }); diff --git a/packages/frontend/src/index.html b/packages/frontend/src/index.html index 558856690..8de01e480 100644 --- a/packages/frontend/src/index.html +++ b/packages/frontend/src/index.html @@ -12,7 +12,7 @@
-