upd: fix cross origin on file proxy

This commit is contained in:
Mar0xy 2023-09-25 02:58:40 +02:00
parent 485173c915
commit 97749e6722
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828

View file

@ -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();
});