Forum Discussion

ichalis_37981's avatar
ichalis_37981
Historic F5 Account
May 14, 2018

iRule to modify HTTP status response header

Hi All, I’m trying to modify the status in a server response from “101” to “101 Switching Protocols” in an iRule. If using HTTP, I can do this by modifying TCP payload. But in our case we are using server-SSL and TCP payload is encrypted. Anyone have any idea how to get around this? It looks like we are restricted to using HTTP:: commands, but there doesn't seem to be any way to modify the status header with these commands. I'm looking at potentially doing a vip-targeting-vip, but would obviously like to see a more elegant way to do this.. :-) Thanks!

 

HTTP/1.1 101

 

Connection: Upgrade

 

Date: Fri, 11 May 2018 07:09:03 GMT

 

Sec-WebSocket-Accept: nSska3Wa5X5bx5eNfw+rOC9c+8Q=

 

Sec-WebSocket-Protocol: x-kaazing-handshake

 

Server: Kaazing Gateway

 

Upgrade: websocket

 

HTTP/1.1 101 Switching Protocols

 

Connection: Upgrade

 

Date: Fri, 11 May 2018 07:06:01 GMT

 

Sec-WebSocket-Accept: is+WC5SRFB37VSUl4bEXO96TF4M=

 

Sec-WebSocket-Protocol: x-kaazing-handshake

 

Server: Kaazing Gateway

 

Upgrade: websocket

 

1 Reply

  • Hi Ichalis,

     

    If you want to manage/change/view HTTP traffic (Request or response) you have to intercept ssl traffic. That's meant that you have to set a ssl client and ssl server profile (ssl decrypt and ssl encrypt).

     

    If you don't decrypt traffic you will not be able to view the traffic and therefore modify it...

     

    Regards,