Updated to correctly generate the url for elastic proxy.