Forum Discussion
JustCooLpOOLe
Cirrocumulus
Apr 16, 2021Getting the First 10 Characters - iRule Help
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]
}
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] }
- JustCooLpOOLe
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] }
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects