Wrapper function which handles proxying of URLs via the portal server.