diff options
| author | Henry Jameson <spam@hjkos.com> | 2021-01-13 21:28:34 +0200 |
|---|---|---|
| committer | Henry Jameson <spam@hjkos.com> | 2021-01-13 21:28:34 +0200 |
| commit | 835eaf33b194b25c41ed24815e6e5cd5eb4570cd (patch) | |
| tree | 27e86b8875c2d88c64d3016d2f867c6d8f94092f /config | |
| parent | 8c82bb61f1a3fa2e8d9d57b00fa5bf66b0577f31 (diff) | |
fix local dev websockets
Diffstat (limited to 'config')
| -rw-r--r-- | config/index.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config/index.js b/config/index.js index ccec4196..7cb87c3b 100644 --- a/config/index.js +++ b/config/index.js @@ -3,6 +3,11 @@ const path = require('path') let settings = {} try { settings = require('./local.json') + if (settings.target && settings.target.endsWith('/')) { + // replacing trailing slash since it can conflict with some apis + // and that's how actual BE reports its url + settings.target = settings.target.replace(/\/$/, '') + } console.log('Using local dev server settings (/config/local.json):') console.log(JSON.stringify(settings, null, 2)) } catch (e) { |
