Skip to content
Snippets Groups Projects
Commit a100b6ba authored by Yannis Barlas's avatar Yannis Barlas
Browse files

fix(server): handle client protocol and port not being defined

parent ed2b1840
No related branches found
No related tags found
No related merge requests found
......@@ -59,9 +59,15 @@ const configureApp = app => {
// Allow CORS from client if host / port is different
if (config.has('pubsweet-client.host')) {
const clientProtocol = config.get('pubsweet-client.protocol') || 'http'
const clientProtocol =
(config.has('pubsweet-client.protocol') &&
config.get('pubsweet-client.protocol')) ||
'http'
let clientHost = config.get('pubsweet-client.host')
const clientPort = config.get('pubsweet-client.port')
const clientPort =
config.has('pubsweet-client.port') && config.get('pubsweet-client.port')
// This is here because webpack dev server might need to be started with
// 0.0.0.0 instead of localhost, but the incoming request will still be
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment