fix(xo-web): don't add servers with empty httpProxy

Fixes #6656

Introduced by 2412f8b1e

This commit also contains a change in `xo-server` to properly handle servers in database that have this problematic entries.
This commit is contained in:
Julien Fontanet
2023-03-03 16:39:13 +01:00
parent eef7940fbc
commit c71104db4f
3 changed files with 7 additions and 1 deletions

View File

@@ -12,6 +12,7 @@
> Users must be able to say: “I had this issue, happy to know it's fixed”
- [Import VM] fix invalid parameters when importing a VM from VMware [Forum#6714](https://xcp-ng.org/forum/topic/6714/vmware-migration-tool-we-need-your-feedback/143) (PR [#6696](https://github.com/vatesfr/xen-orchestra/pull/6696))
- [Backup] Fix _A "socket" was not created for HTTP request before 300000ms_ error [Forum#59163](https://xcp-ng.org/forum/post/59163) [#6656](https://github.com/vatesfr/xen-orchestra/issues/6656)
### Packages to release

View File

@@ -29,6 +29,11 @@ export class Servers extends Collection {
delete server.error
}
server.readOnly = server.readOnly === 'true'
// see https://github.com/vatesfr/xen-orchestra/issues/6656
if (server.httpProxy === '') {
delete server.httpProxy
}
})
return servers

View File

@@ -612,7 +612,7 @@ export const addServer = (host, username, password, label, allowUnauthorized, ht
_call('server.add', {
allowUnauthorized,
host,
httpProxy,
httpProxy: httpProxy || undefined,
label,
password,
username,