Skip to content
Snippets Groups Projects
Unverified Commit fda5147d authored by かっこかり's avatar かっこかり Committed by GitHub
Browse files

fix(dev): ファイルの読み込みに失敗することがあるのを修正 (#12684)

* (enhance) コード入力をMkCodeEditorに変更

* (fix) devでファイルの読み込みに失敗することがある

* Revert "(enhance) コード入力をMkCodeEditorに変更"

This reverts commit 726d56c3e962680efc5b5a166e2210d09730341f.
parent 17065418
No related branches found
No related tags found
No related merge requests found
......@@ -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();
});
......
......@@ -12,7 +12,7 @@
<html>
<head>
<meta charset="UTF-8" />
<title>misskey</title>
<title>[DEV] Loading...</title>
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta
http-equiv="Content-Security-Policy"
......@@ -21,7 +21,8 @@
script-src 'self' 'unsafe-eval';
style-src 'self' 'unsafe-inline';
img-src 'self' data: www.google.com xn--931a.moe localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000;
media-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000;"
media-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000;
connect-src 'self' localhost:3000 localhost:5173 127.0.0.1:5173 127.0.0.1:3000;"
/>
<meta property="og:site_name" content="[DEV BUILD] Misskey" />
<meta name="viewport" content="width=device-width, initial-scale=1">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment