diff --git a/webapp/config/index.js b/webapp/config/index.js index 8aa5b157a..fd564f350 100644 --- a/webapp/config/index.js +++ b/webapp/config/index.js @@ -18,6 +18,7 @@ const environment = { const server = { GRAPHQL_URI: process.env.GRAPHQL_URI || 'http://localhost:4000', BACKEND_TOKEN: process.env.BACKEND_TOKEN || 'NULL', + WEBSOCKETS_URI: process.env.WEBSOCKETS_URI || 'ws://localhost:4000/graphql', } const sentry = { diff --git a/webapp/plugins/apollo-config.js b/webapp/plugins/apollo-config.js index 832789dba..51dac51c5 100644 --- a/webapp/plugins/apollo-config.js +++ b/webapp/plugins/apollo-config.js @@ -11,7 +11,7 @@ export default ({ req, nuxtState }) => { const backendUrl = env.GRAPHQL_URI || 'http://localhost:4000' return { - wsEndpoint: env.WEBSOCKETS_URI || 'ws://localhost:4000/graphql', + wsEndpoint: env.WEBSOCKETS_URI, httpEndpoint: process.server ? backendUrl : '/api', httpLinkOptions: { credentials: 'same-origin',