Fix to support PHP proxy and removal of serviceUrl when download files

@markewallace - Hi Mark. Here the temporary fix that we discussed earlier (i.e. added endpoint name to the header).