Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

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

Thiyagu
Cirrus
Cirrus

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

2 REPLIES 2

Paulius
MVP
MVP

@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"
}