Forum Discussion
michael_trott_1
Nimbostratus
May 22, 2008data rewrite http -> https
hi all,
bacically trying to rewrite data sent back to the client, in short Client connects in with https does there stuff with no problems.
One feature in the app when they select it it delivers over http, ie http page popup send back to client to connect in and grab content, would generally be fine but the content of the data is sensitive, so really needs to be https.
this is what i have, but not working, any ideas ? I have another irule that i use to redistribute the traffic based on URI, i have tried appending the following code to the bottom of the existing irule and also creating a new one, neither makes any difference.
when HTTP_RESPONSE {
HTTP::header replace Location "[string map {http:// https://} [HTTP::header Location]]"
}
thanks all
1 Reply
- hoolio
Cirrostratus
Can you try using a browser plugin like Fiddler for IE or LiveHttpHeaders for FF to see whether it's a 30x redirect that contains a Location header with http and/or page content?
The iRule you have listed would insert a Location header in every response. You would most likely want to do this only if there was a Location header already (ie, it's a redirect). You can add a check to see if HTTP::is_redirect is true to do this.when HTTP_RESPONSE { if {[HTTP::is_redirect]}{ HTTP::header replace Location "[string map {http:// https://} [HTTP::header Location]]" } }
If it does turn out to be page content which contains absolute references to http, you can use a stream profile and a rule like this to rewrite the references to https (Click here).
Aaron
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
