How to get browserdetailsurl on client and / or server

Hello

I am developing a cordova app with touchkit. The client code resides on the device. Thus the browserurl is of type file-scheme: file://
I order to use the filetransfer plugin I need to get the host and contextpath of my application sitting behind a reverse proxy.
Because of the reverse proxy I can’t use getcontextpath from the servlet class.
How do I get the browserdetailsurl which is different from the getContextpath of my servlet and different from that, what page.getcurrent reports?
I don’t care if I have to retrieve this information on the client or on the server.

Kind regards
Christian