Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

URL branching in pre request access policy

AlexS_yb
Cirrocumulus
Cirrocumulus

Hi

 

I have an access policy that is shared amongst a few VS in their own partitions.

the AP and per request policy exist in /common

and VS's in their own partitions utilise this.

 

I have URL branch object and I would like branch on the URL

i use the dialogue boxes and end up with something like this

expr {[mcget {perflow.branching.url}] contains "abc.com/diag-sso"}

This is mean to capture

https://<??>.abc.com/diag-sso 

But it might also capture something like

https://<??>.abc.com/Some/OtherURI/abc.com/diag-sso 

 

which is not what I want. Now as this is a shared policy how can I get the hostname associated with the VS

or how can I change it to match something like this regex

https://[^.]*.abc.com/diag-sso 

 

it would actually be nice if you could actually access just the URI - path of  {perflow.branching.url} if I could guarantee it was at the first /

so for completeness if

{perflow.branching.url} => https://<??>.abc.com/diag-sso 

???? => /diag-sso  

 

 

2 REPLIES 2

lnxgeek
MVP
MVP

Hi

You could insert an iRule event where you have the option to match on URI and then set a flag. This flag can then be used in the policy to branch out.

/T

it would be better if I can keep all of the code in once place. I was thinking to just use the advance setting on the expression and change from contrain to a regex test