cancel
Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.

Getting the First 10 Characters - iRule Help

JustCooLpOOLe
Cirrocumulus
Cirrocumulus

Hi,

 

I'm taking a session variable and inserting it into a header. Now I want to get the first 10 positions of that session variable. Any ideas on the best approach for this? I know string map and string range are a thing but not sure where that needs to be inserted as so not to break anything.

 

 

when ACCESS_ACL_ALLOWED {       HTTP::header insert "THING" [ACCESS::session data get session.logon.last.upn]   }
1 ACCEPTED SOLUTION

JustCooLpOOLe
Cirrocumulus
Cirrocumulus

It's working!

 

when ACCESS_ACL_ALLOWED {   set lastupn [ACCESS::session data get session.logon.last.upn] HTTP::header insert "THING" [string range $lastupn 0 9]   }

 

View solution in original post

1 REPLY 1

JustCooLpOOLe
Cirrocumulus
Cirrocumulus

It's working!

 

when ACCESS_ACL_ALLOWED {   set lastupn [ACCESS::session data get session.logon.last.upn] HTTP::header insert "THING" [string range $lastupn 0 9]   }