Forum Discussion
MW1
Cirrus
Jul 02, 2010Is this feasible - match uri value from local value in file?
All,
my company has asked me if it is possible to match a URI in a request from a value in a local file, if the value matches the F5 would then insert a encrypted cookie with the client IP (...
Chris_Miller
Altostratus
Jul 03, 2010When you say "local file" - do you mean local to the F5? It sounds like you might be able to use datagroups for this.
http://devcentral.f5.com/wiki/default.aspx/iRules/matchclass.html
You'll want to do the following:
Create a "string" type datagroup with a string of the value you mentioned. Let's call it "test"
Now, you'll create an iRule like the one below:
when HTTP_REQUEST {
if { [matchclass [HTTP::uri] eq $::test] } {
HTTP::cookie insert name "x" value "[IP::client_addr]" } }
That's obviously not encrypted - but you get the idea.
As far as the "value changing" goes - you might simply have two different strings in your datagroup - those are very scalable and easy to manage.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
