Forum Discussion
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".
Presently, the flow looks something like this:
original-client.inbound.url --> F5 (mapped to: some.targeted.server.url) --> application on targeted server needs the "original-client.inbound.url", but only has "some.targeted.server.url" on the request header.
Is it possible to configure F5 to capture the original inbound URL and pass it along (as a header item or new url parameter) to the app server that F5 has targeted?
Thanks
1 Reply
- hoolio
Cirrostratus
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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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
