This causes issues if protocol is https, port is mapped or server is accessed with an other name. Patch to use with git apply: https://gist.github.com/tetraf/5611901