How to deal with absolute path and cross orgin

We tried to set up Pomerium to provide access to some of our internal resources. Most of these resources are legacy systems that we cannot modify.

However, we encountered some issues. We are getting redirected out of Pomerium as soon as:

  • There is any absolute path, either in the HTML or in a JavaScript fetch.
  • There is any cross-origin request (such as an API call, iframe, etc.).

Are there any workarounds for these issues? It seems like this should be a fairly common problem, but I haven’t found much discussion on it so far.

Hello,

  1. absolute paths may only probably cause issue if you’re trying to place multiple applications on the same domain. If that is the case, try separating applications across various domains.
  2. if your application has hardcoded URL somewhere that you cannot adjust, you may have to rewrite the contents of the response. Pomerium does not do that, you may add another proxy between Pomerium and your app with something like mod_proxy_html - Apache HTTP Server Version 2.4
  3. approaches dealing with cross-origin API calls are discussed here: Cross-Origin Configuration | Pomerium

Thanks for the help!