diff --git a/server/core/servers.js b/server/core/servers.js index 95046e657..92cd903aa 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, cors: false }) + this.servers.graph.applyMiddleware({ app: WIKI.app }) }, /** * Close all active connections diff --git a/server/master.js b/server/master.js index fea5e34a2..84192611c 100644 --- a/server/master.js +++ b/server/master.js @@ -42,8 +42,8 @@ module.exports = async () => { // ---------------------------------------- app.use(mw.security) - app.use(cors({ origin: false })) - app.options('*', cors({ origin: false })) + app.use(cors(WIKI.config.cors)) + app.options('*', cors(WIKI.config.cors)) 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 faa3549a5..1c618781a 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().replace(/\r?\n|\r/g, '') + const rawText = $(item).text() if (mustacheRegExp.test(rawText)) { $(item).parent().attr('v-pre', true) }