From c57c9d901807c6cb88f7f4e443925332eccaea1f Mon Sep 17 00:00:00 2001 From: NGPixel Date: Thu, 25 Mar 2021 21:19:32 -0400 Subject: [PATCH] fix: disable cors --- server/core/servers.js | 2 +- server/master.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/server/core/servers.js b/server/core/servers.js index 92cd903a..95046e65 100644 --- a/server/core/servers.js +++ b/server/core/servers.js @@ -130,7 +130,7 @@ module.exports = { path: '/graphql-subscriptions' } }) - this.servers.graph.applyMiddleware({ app: WIKI.app }) + this.servers.graph.applyMiddleware({ app: WIKI.app, cors: false }) }, /** * Close all active connections diff --git a/server/master.js b/server/master.js index 84192611..fea5e34a 100644 --- a/server/master.js +++ b/server/master.js @@ -42,8 +42,8 @@ module.exports = async () => { // ---------------------------------------- app.use(mw.security) - app.use(cors(WIKI.config.cors)) - app.options('*', cors(WIKI.config.cors)) + app.use(cors({ origin: false })) + app.options('*', cors({ origin: false })) if (WIKI.config.security.securityTrustProxy) { app.enable('trust proxy') }