хз, а как ты настраиваешь ng-socker
в app.modules
let serverUrl = JSON.parse(localStorage.getItem('serverUrl'));
if (serverUrl === null) {
serverUrl = defaultsSetting.serverUrl;
localStorage.setItem('serverUrl', JSON.stringify(serverUrl));
}
const config: SocketIoConfig = {url: serverUrl, options: {origins: '*:*'}};