Configuring a Proxy
Configure proxy support either server wide or per integration
Proxy configuration is required if your Polarity server needs proxy access to reach the Internet and you are running integrations that rely on Internet based services or resources. Proxy support can be enabled for integrations either on a server-wide basis or a per-integration basis.
In general, integrations that will be connecting to internal resources do not need to have a proxy configured. Integrations that will be accessing Internet based APIs will need to have a proxy configured. If you are seeing an ECONNRESET
error when using your integration, this is most commonly due to a missing or misconfigured proxy configuration for the integration.
Global Proxy
A global proxy will pass all integration traffic through the configured proxy. The proxy can be set via the HTTP_PROXY
and HTTPS_PROXY
environment variables. Specific domains or IPs can be set to ignore the proxy configuration via the NO_PROXY
environment variable.
To set the required environment variables begin by opening the .env
file found at /app/.env
.
Add HTTP_PROXY
and HTTPS_PROXY
variables to the file. Ensure that the USERNAME:PASSWORD
and proxy SERVER:PORT
are replaced with your own proxy settings. If the proxy is unauthenticated then you do not need to provide the USERNAME:PASSWORD@
portion of the proxy configuration string (i.e., http://PROXYSERVER:PROXYPORT
is all that would be required).
After saving changes to the .env
you must restart the docker containers for the changes to take effect.
Integration Specific Proxies
To set the proxy on each individual integration and not system-wide, please follow the below instructions:
Integration specific proxies are now easily configurable via the Polarity UI on the integration's Advanced Settings page.
Navigate to the integration you want to add the proxy to in the UI. Then click on Settings -> Advanced Settings
then navigate to the Integration Proxy button in the middle of the page. Then state whether it is HTTP or HTTPs, add the host, port and a username or password if one is required.
Testing the proxy using curl
If you need to confirm that you have the correct proxy information you can use the following curl
command to test your proxy.
Last updated