OIDC Authenticator does not work with Azure App gateway URL

I’m trying to setup OIDC authenticator process but without luck :frowning:
I have deployed xwiki 14.10 version on Azure Kubernetes cluster with MYSQL using docker containerization. The application is configured behind the Azure Application Gateway.
For the xwiki we have configured SSO using OIDC authenticator with internal siteminder.
The configuration and login works absolutely fine when we try to access the application with base url of xwiki.

But when we try to access it with the App Gateway url the login does not work give the below error. The base url of the xwiki applicaiton is different and the app gateway url is different

Can someone please suggest/help on this? how do we do this?

Enabling debug log might help understand exactly what happen, which might give a hint of what is the cause.