Forum Discussion

Thiyagu's avatar
Thiyagu
Icon for Cirrus rankCirrus
Oct 20, 2023

Irule to insert subject CN in HTTP Header to the backend servers

Hello All,

I'm working to create an iRule to insert subject CN value in the server side connections to the backend servers.

The client side connection will not have any Subject CN value and for the server side connection LTM needs to add the Subject CN value?

Could you please help?

Does the below iRule will work?

when HTTP_REQUEST_RELEASE {
HTTP::header insert X-Common-Name "1234"
}

Regards,

Thiyagu

  • Thiyagu That should work but I would do it this way.

    when HTTP_REQUEST priority 500 {
    
        HTTP::header insert X-Common-Name "1234"
    
    }
  • Remove the header, before adding it is safer.

    when HTTP_REQUEST priority 500 {
        HTTP::header remove X-Common-Name
        HTTP::header insert X-Common-Name "1234"
    }