20-Mar-2022 19:38
Hi All
i want to insert a header a certain header
in my scenario - i want to insert a custom header after - accept: application/json
can can someone guide -
Thanks
21-Mar-2022 15:35
thanks for the reply - it does insert a header - but not right after - but as the last header
i am trying tackel - Expect: 100-continue -- if i can insert it on F5 instead of client sending it through
22-Mar-2022 04:32
Gotcha, how about something like...
when HTTP_REQUEST {
if {[HTTP::header "Accept"] contains "application/json"}{
foreach aHeader [HTTP::header names] {
set hValue [HTTP::header value $aHeader]
if {$aHeader == "Accept"}{
HTTP::header remove $aHeader
HTTP::header insert $aHeader $hValue
HTTP::header insert "New-Header" "New-Header-Value"
} else {
HTTP::header remove $aHeader
HTTP::header insert $aHeader $hValue
}
}
}
}