fix(xen-api): fix proxy support (#6204)

Introduced by c99120bd2
This commit is contained in:
Julien Fontanet 2022-04-25 16:26:56 +02:00 committed by GitHub
parent e69f58eb86
commit bbf3dae37f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -15,6 +15,7 @@
> Users must be able to say: “I had this issue, happy to know it's fixed”
- [VM/Host Console] Fix support of older versions of XCP-ng/XS, please not that HTTP proxies are note supported in that case [#6191](https://github.com/vatesfr/xen-orchestra/pull/6191)
- Fix HTTP proxy support to connect to pools (introduced in XO 5.69.0) [#6204](https://github.com/vatesfr/xen-orchestra/pull/6204)
### Packages to release
@ -35,6 +36,8 @@
- @vates/cached-dns.lookup major
- @vates/event-listeners-manager major
- xen-api patch
- xo-vmdk-to-vhd minor
- @xen-orchestra/proxy patch
- xo-server minor
- xo-web minor

View File

@ -122,8 +122,9 @@ export class Xapi extends EventEmitter {
}
this._allowUnauthorized = opts.allowUnauthorized
if (opts.httpProxy !== undefined) {
this._httpAgent = new ProxyAgent(this._httpProxy)
const { httpProxy } = opts
if (httpProxy !== undefined) {
this._httpAgent = new ProxyAgent(httpProxy)
}
this._setUrl(url)