commit: 835eaf33b194b25c41ed24815e6e5cd5eb4570cd
parent 8c82bb61f1a3fa2e8d9d57b00fa5bf66b0577f31
Author: Henry Jameson <spam@hjkos.com>
Date: Wed, 13 Jan 2021 21:28:34 +0200
fix local dev websockets
Diffstat:
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
@@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Fixed
- Follows/Followers tabs on user profiles now display the content properly.
- Handle punycode in screen names
+- Fixed local dev mode having non-functional websockets in some cases
## [2.2.2] - 2020-12-22
### Added
diff --git 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) {