diff --git a/server/core/servers.js b/server/core/servers.js index 92cd903aa..95046e657 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 84192611c..fea5e34a2 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') } diff --git a/server/modules/rendering/html-core/renderer.js b/server/modules/rendering/html-core/renderer.js index 1c618781a..faa3549a5 100644 --- a/server/modules/rendering/html-core/renderer.js +++ b/server/modules/rendering/html-core/renderer.js @@ -250,7 +250,7 @@ module.exports = { const list = $(node).contents().toArray() list.forEach(item => { if (item.type === 'text') { - const rawText = $(item).text() + const rawText = $(item).text().replace(/\r?\n|\r/g, '') if (mustacheRegExp.test(rawText)) { $(item).parent().attr('v-pre', true) }