Skip to Content
0
Aug 23, 2023 at 10:46 AM

Approuter deployed behind a redirect url

136 Views

Hi,

We have an approuter deployed behind a redirect URL (a k8s Ingress to be specific). So the root of the approuter sits at a url like https://my.host.com/path/to/approuter/

We are struggling to get the login redirect to come back properly. If we configure it like this in xs-app.json

{
    "login": {
        "callbackEndpoint": "/path/to/approuter/login/callback"
   }
}

we get the call back directed into https://my.host.com/path/to/approuter/login/callback?code=..., but since the approuter is mounted behind the Ingress, the approuter in turn sees the path "/login/callback" (i.e. without the prefix).

I am not able to find any option in the approuter configuration to tell it that it is mounted below the root path, or for that matter give it an explicit redirect url.

I assume this is a trivial question with a config option I am just not finding. Can somebody help?

Thanks in advance!

//Carl