Skip to content

Support alternative Node.js origin

Latest
Compare
Choose a tag to compare
@emiln emiln released this 16 Nov 11:03

Use alternative origin

You can now pass -o <URL>, pass --origin <URL>, or set the environment variable NVI_NODE_ORIGIN to use a different origin domain for downloading the Node.js tar.gz file.

E.g.

nvi -n 20.9.0 -o https://my-proxy.example.com

and

NVI_NODE_ORIGIN=https://my-proxy.example.com nvi -n 20.9.0

will both download from https://my-proxy.example.com instead of from https://nodejs.org. It will use the same path, so alternative origins must be proxies without any changes to e.g. the path of the URL.

The main use case is that you can now inject your own caching proxy if you, like us, are experiencing issues downloading from the official origin due to rate limits or network issues. Since we don't want to pick a specific proxy or make our own available, you will have to set one up or find a public one if you want to use the feature.