Skip to content

Commit

Permalink
Resolve WEBSOCKETS_URI config problem
Browse files Browse the repository at this point in the history
- Value was not overtaken from .env.
  • Loading branch information
Tirokk committed Feb 15, 2021
1 parent 2ef537f commit ac27d6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions webapp/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion webapp/plugins/apollo-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit ac27d6a

Please sign in to comment.