Get client url in the OpenIG route

Tagged: ,

This topic contains 3 replies, has 2 voices, and was last updated by  sunilr8 1 week, 2 days ago.

  • Author
    Posts
  • #26273
     srinath.m 
    Participant

    Hi Team,

    I am not able get the requesting client url in the OpenIG route to route to different downstream server.
    Below is my route

    {
      "handler": {
        "type": "StaticResponseHandler",
        "config": {
          "status": 200,
          "reason": "OK",
          "entity": "Hello, world!"
        }
      },
      "monitor": "${true}",
      "condition": "${matches(request.uri.origin, 'http://rainbow-client-dev.asia.essilor.group')}"
    }

    I have tried with request.uri.host – which gives the NGINX uri but I need client url before NGINX.

    I can see in OpenIG debug logs request :

    host: backend-crimson
    nncoection: close
    origin: http://rainbow-client-dev.asia.essilor.group

    I would like to get origin in route. Any help on this would be appreciated.

    Thanks,
    Srinath

    • This topic was modified 2 weeks, 1 day ago by  srinath.m.
    #26447
     sunilr8 
    Participant

    Hey Srinath,

    give this one a try

    ${matches(request.headers[origin],”)}

    #26450
     srinath.m 
    Participant

    Thanks @sunilr8, Its working..

    Thanks,
    Srinath

    #26452
     sunilr8 
    Participant

    nice

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

©2019 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?