summary refs log tree commit diff
path: root/src/cdn/Server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/cdn/Server.ts')
-rw-r--r--src/cdn/Server.ts14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/cdn/Server.ts b/src/cdn/Server.ts
index b27d3321..ec5edc68 100644
--- a/src/cdn/Server.ts
+++ b/src/cdn/Server.ts
@@ -1,9 +1,9 @@
-import { Server, ServerOptions } from "lambert-server";
 import { Config, getOrInitialiseDatabase, registerRoutes } from "@fosscord/util";
+import bodyParser from "body-parser";
+import { Server, ServerOptions } from "lambert-server";
 import path from "path";
 import avatarsRoute from "./routes/avatars";
 import iconsRoute from "./routes/role-icons";
-import bodyParser from "body-parser";
 
 export interface CDNServerOptions extends ServerOptions {}
 
@@ -24,14 +24,8 @@ export class CDNServer extends Server {
 				"Content-security-policy",
 				"default-src *  data: blob: filesystem: about: ws: wss: 'unsafe-inline' 'unsafe-eval'; script-src * data: blob: 'unsafe-inline' 'unsafe-eval'; connect-src * data: blob: 'unsafe-inline'; img-src * data: blob: 'unsafe-inline'; frame-src * data: blob: ; style-src * data: blob: 'unsafe-inline'; font-src * data: blob: 'unsafe-inline';"
 			);
-			res.set(
-				"Access-Control-Allow-Headers",
-				req.header("Access-Control-Request-Headers") || "*"
-			);
-			res.set(
-				"Access-Control-Allow-Methods",
-				req.header("Access-Control-Request-Methods") || "*"
-			);
+			res.set("Access-Control-Allow-Headers", req.header("Access-Control-Request-Headers") || "*");
+			res.set("Access-Control-Allow-Methods", req.header("Access-Control-Request-Methods") || "*");
 			next();
 		});
 		this.app.use(bodyParser.json({ inflate: true, limit: "10mb" }));