GUI-762: Handle redirects properly on an HTTPS proxy setup (e.g. nginx)