Fix XDR proticol bug

Replace endpoint protocol with protocol used by the page
XDR cannot post to https from a page running on http
Merge pull request #62 from mnmtanish/fix-xdr-protocol-bug

Fix XDR protocol bug