Just run a proxy on your server. Everything uses the same server:port
so no SOP issues and the server (i.e. your proxy) figures out where to
send the request. Jetty does this quite nicely for development.
(This has been asked and answered before. Google for more detailed answers.)