fix(dev): ファイルの読み込みに失敗することがあるのを修正 (#12684)
* (enhance) コード入力をMkCodeEditorに変更 * (fix) devでファイルの読み込みに失敗することがある * Revert "(enhance) コード入力をMkCodeEditorに変更" This reverts commit 726d56c3e962680efc5b5a166e2210d09730341f.
This commit is contained in:
parent
17065418cf
commit
fda5147d06
2 changed files with 6 additions and 2 deletions
|
@ -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();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue