Fix for additional https rewriting that is needed in proxy mode.
Merge pull request #22 from vonrosen/ari-3745

Additional fix needed for https://webarchive.jira.com/browse/ARI-3745
(merge it for now, need to investigate more)