AnsweredAssumed Answered

Maintain custom path at browser / client?

Question asked by CBertagnolli Champion on Feb 9, 2018
Latest reply on Feb 13, 2018 by CBertagnolli

I'm trying to create a reverse proxy with a custom path that the application itself doesn't use. But having problems trying to maintain the path when all the href within the application may be like /something/other . This would be dynamic and change based on app.

 

What the applications wanted was having a common entry hostname but custom paths to apps.

 

=======

Example:

my.domain/app1/   -- reverse proxy --> myapp1.domain/engineering

my.domain/app2/ -- reverse proxy --> myapp2.domain/

my.domain/app3/ -- reverse proxy --> myapp3.domain/something/other

 

They want the /appX/ to be maintained through redirects, href links, etc. 

 

I've got the /app1/ being removed on the route, that's simple enough. What I'm not quite sure about is how to ensure that the /app1/ is maintained through all redirects (location rewrite should handle the 302s etc I assume) but like JS sending me to another spot breaks out. 

 

=======

Problem Example

 

- User goes to my.domain/app1/ and traffic proxied to myapp1.domain/engineering

- myapp1.domain/engineering slaps "/engineering/default/home" and user ends up at to my.domain/engineering/default/home and gets error.

 

I need all of that to be my.domain/app1/engineering/default/home

=======

 

Is this doable? Or good documentation somewhere I can follow? I've tried finding it in the docops but not seeing this specific case since their publish proxy is hostname routing examples. 

Outcomes