Forum Discussion

Rodney_Newton_7's avatar
Rodney_Newton_7
Icon for Nimbostratus rankNimbostratus
Oct 05, 2005

client ssl

I have an https virtual server with a clientssl profile. When connecting to the virtual server the client gets a popup message "This page contains both secure and non secure items. Do you wish to display the non secure items?" Yes/No/Cancel

 

 

Instead of rewriting the web page to use relative links instead of explicit... how would I implement an iRule that changed every href from http to https? Any help is appreciated.

 

 

  • There are several ways you can modify the content of the response payload. One of the more optimal ways is to use the "regexp" command with the "-indices" option to return indices of all instances of a searched for string in the payload and then use the "HTTP::payload replace" command to replace those values with the new string.

     

     

    Here's a blog post that I did that covers a forum post on this topic:

     

     

    http://devcentral.f5.com/weblogs/joe/archive/2005/07/27/1398.aspx

     

    Click here

     

     

    BTW, now that I think about it you might want to keep track of the total lenght change on update the "Content-Length" HTTP Response header with the correct value.

     

     

    -Joe
  • For some reason I thought that using the stream profile for this was considered more optimal than regex? (I am getting near the point where I want to implement a rule similar to this)..

     

     

    Thanks,

     

    Brian
  • drteeth_127330's avatar
    drteeth_127330
    Historic F5 Account
    Brandorr is correct. Using the STREAM module is better in many cases since it does not require buffering the entire response.
  • drteeth_127330's avatar
    drteeth_127330
    Historic F5 Account
    That's what the http response rechunk profile option is for. Of course, it only works if chunking is enabled.