Resolve WEBSOCKETS_URI config problem

- Value was not overtaken from .env.
This commit is contained in:
Wolfgang Huß 2021-02-15 15:42:00 +01:00
parent 2ef537fd70
commit ac27d6ac96
2 changed files with 2 additions and 1 deletions

View File

@ -18,6 +18,7 @@ const environment = {
const server = { const server = {
GRAPHQL_URI: process.env.GRAPHQL_URI || 'http://localhost:4000', GRAPHQL_URI: process.env.GRAPHQL_URI || 'http://localhost:4000',
BACKEND_TOKEN: process.env.BACKEND_TOKEN || 'NULL', BACKEND_TOKEN: process.env.BACKEND_TOKEN || 'NULL',
WEBSOCKETS_URI: process.env.WEBSOCKETS_URI || 'ws://localhost:4000/graphql',
} }
const sentry = { const sentry = {

View File

@ -11,7 +11,7 @@ export default ({ req, nuxtState }) => {
const backendUrl = env.GRAPHQL_URI || 'http://localhost:4000' const backendUrl = env.GRAPHQL_URI || 'http://localhost:4000'
return { return {
wsEndpoint: env.WEBSOCKETS_URI || 'ws://localhost:4000/graphql', wsEndpoint: env.WEBSOCKETS_URI,
httpEndpoint: process.server ? backendUrl : '/api', httpEndpoint: process.server ? backendUrl : '/api',
httpLinkOptions: { httpLinkOptions: {
credentials: 'same-origin', credentials: 'same-origin',