Develop Locally: Moovweb SDK Proxy Support
The Moovweb SDK provides support to run
moov commands on network environments where you need to go through a proxy to gain Internet access. By default, Moovweb SDK versions 4.8.20+ will automatically use the environment variable
http_proxy if it is set. Currently, there is no support for the
Linux and Mac OS X
Temporarily configure the environment for the command you want to run. For example, for moov login:
env http_proxy=http://<proxy>:<port> moov login
Set the environment for the duration of your shell
By default, Linux and Mac OS X systems limit the environment that sudo runs with. This means that unless you have explicitly set the
http_proxy environment variables to be kept, sudo will not inherit the value for
http_proxy. (see Sudoers environment)
You can get a list of environment variables by typing
printev. To get a list of environment variables that sudo runs with, type
Here are some other commands to understand your environment:
printenv | grep proxy
sudo printenv | grep proxy # normally this will not show the http_proxy variable
sudo -E printenv | grep proxy # the -E flag keeps the environment of the current shell so that sudo has access to the variables defined in the current session.
Any moov commands that require sudo will need to be run with
sudo -E moov start or
sudo -E moov server
One alternative is to modify the /etc/sudoers file (with
sudo visudo) and add
http_proxy to the
Defaults env_keep variable. If this is configured, then you can run sudo commands without the -E flag and the
http_proxy environment variable will be read appropriately.
On Windows platforms, you just need to set the same
http_proxy environment variable for either your user account or system-wide. Once this is set, you will have to restart any Command Prompt windows for the environment variable to take effect.
To do this on Windows 7, click on Start and search for “View advanced system settings” and then click on “Environment Variables”. You can then set the appropriate
http_proxy variable and value.