Proxy

All calls to the server can be proxied by providing a proxy definition in either of the following two ways:

1

Provide proxy in initialization config

Pass a proxy definition in the initialization config argument for LicenseAPI, LicenseManager or FloatingAPI, for example:

example.js
const licenseAPI = new LicenseAPI({
  apiKey: '12345678-4bfe-4e3a-8737-757004d6294c',
  sharedKey: 'eYuHrlajvIVTiSFIXpxpKhw78f4Ewy-00-12345678',
  appName: 'js-sdk-test-1',
  appVersion: '0.0.1',
  proxy: {
    host: '127.0.0.1',
    port: 9000,
  },
});
2

Set proxy after initialization

Call the setProxy method on an initialized LicenseAPI, LicenseManager or FloatingAPI object, for example:

example.js
licenseAPI.setProxy({
  host: '127.0.0.1',
  port: 9000,
});

For the type declaration of the proxy definition object, see AxiosProxyConfig in the Type Declarations article.

Last updated

Was this helpful?