I have seen lots of threads about using HTTP::payload replace to substitute content in a server response. It can also be used to add content to the payload.
One requirement is that you add “response rechunk” to the http profile.
This example adds text to the payload sent to the client. It could easily be a variable.
profile http profile-http-test {
defaults from http
response rechunk
insert xforwarded for enable
}
when HTTP_RESPONSE {
Insert HTML comment to the top of the payload.
http::payload replace 0 0 “”
}