Forum Discussion
Jim_1600
May 24, 2011Nimbostratus
Is there a way to capture an inbound URL and pass it along?
As an app developer, I have a situation were our app server needs to know the original inbound URL that was used to hit F5, in order to avoid triggering a "same origin policy".
Pres...
hoolio
May 27, 2011Cirrostratus
Hi Jim,
You can insert a cookie using HTTP::cookie insert and a header using HTTP::header insert in the HTTP_REQUEST event:
http://devcentral.f5.com/wiki/default.aspx/iRules/http__cookie
http://devcentral.f5.com/wiki/default.aspx/iRules/http__header
You can get the requested host using [HTTP::host] and the URI using [HTTP::uri]. If you're inserting something in a cookie, you should consider URI (percent) encoding it:
http://devcentral.f5.com/wiki/default.aspx/iRules/http__host
http://devcentral.f5.com/wiki/default.aspx/iRules/http__uri
http://devcentral.f5.com/wiki/default.aspx/iRules/uri__encode
If you get stuck, let us know what you've tried and what issue(s) you're seeing. If you have an anonymized example of the original request headers you expect from the client and what you'd like the modified request to look like, we could give you a more exact example iRule.
Aaron
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