Forum Discussion
rewriting location header data
wget --no-check-certificate -S "https://69.80.196.153/zap?aid=10000066&sid=6&can=fffffffffffffffe" -O /dev/null 2>&1 | grep " Location: " | grep --color "http://"
Location: https://bh.contextweb.com/bh/rtset?do=add&pid=536088&ev=4614711881901867008&rurl=http://matcher-cwb.bidder7.mookie1.com/do-association?return=ctxweb%26can=fffffffffffffffe
Location: http://matcher-cwb.bidder7.mookie1.com/do-association?return=ctxweb&can=fffffffffffffffe
Location: http://ib.adnxs.com/getuid?http://matcher-apx.bidder7.mookie1.com/appnexus?can=ffffffffffffffee%26adnxs_uid=$UID
A customer has requested to see if the possibility exists to rewrite the location headers from http to https. The first "location: https" is the F5. We are terminating the ssl connection on the F5 and passing the connection to a pool of servers on port 80. We are using an HTTP profile to rewrite the response to https. Is it possible to rewrite the rest of the location headers in the response?
I found and tried the iRule below but didn't work:
whenHTTP_RESPONSE{
14
15 Check if response type is text
16 if{[HTTP::headervalue Content-Type] contains"text"}{
17
18 Replace http:// with
19 STREAM::expression{@http://@https://@}
20
21 Enable the stream filter for this response only
22 STREAM::enable
23 }
24 }
Any help would be greatly appreciated.
Thanks in advance!
- hoolioCirrostratusHi Eddie,
- nitassEmployeewhy is the app returning multiple Location headers?i understand there are multiple location headers since wget follows redirection response.
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