From e0e25e3086a07dcf65b35222425cb1a4a6939f75 Mon Sep 17 00:00:00 2001 From: Alexandros Georgantas <alexgeorg86@gmail.com> Date: Thu, 23 Feb 2023 18:13:22 +0200 Subject: [PATCH] fix(server): use correct env variable for cors --- src/corsConfig.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/corsConfig.js b/src/corsConfig.js index c082321..1c1e38f 100644 --- a/src/corsConfig.js +++ b/src/corsConfig.js @@ -1,12 +1,10 @@ const config = require('config') const createCORSConfig = () => { - if (!config.has('pubsweet-client.url')) return null - - const clientUrl = config.has('clientUrl') && config.get('clientUrl') + if (!config.has('clientUrl')) return null return { - origin: clientUrl, + origin: config.get('clientUrl'), credentials: true, } } -- GitLab