fix local dev websockets
This commit is contained in:
parent
8c82bb61f1
commit
835eaf33b1
|
@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
### Fixed
|
### Fixed
|
||||||
- Follows/Followers tabs on user profiles now display the content properly.
|
- Follows/Followers tabs on user profiles now display the content properly.
|
||||||
- Handle punycode in screen names
|
- Handle punycode in screen names
|
||||||
|
- Fixed local dev mode having non-functional websockets in some cases
|
||||||
|
|
||||||
## [2.2.2] - 2020-12-22
|
## [2.2.2] - 2020-12-22
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -3,6 +3,11 @@ const path = require('path')
|
||||||
let settings = {}
|
let settings = {}
|
||||||
try {
|
try {
|
||||||
settings = require('./local.json')
|
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('Using local dev server settings (/config/local.json):')
|
||||||
console.log(JSON.stringify(settings, null, 2))
|
console.log(JSON.stringify(settings, null, 2))
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|
Loading…
Reference in New Issue