The Burp Suite User Forum was discontinued on the 1st November 2024.

Burp Suite User Forum

For support requests, go to the Support Center. To discuss with other Burp users, head to our Discord page.

SUPPORT CENTER DISCORD

Conditionally/unconditionally add response headers

Gene | Last updated: Apr 02, 2021 03:52PM UTC

I want to conditionally add response headers, but having a hard time knowing if there are any apis to do this easily. I basically want to UNconditionally add some response headers and conditionally add a response header if that header is NOT already in the response headers. Questions: Are there any apis to simply check whether or not a response header exists, or am I stuck with checking the whole IHttpRequestResponse#getResponse as a string? Are there any apis that simply append a response header to the response, or an I stuck with having to use IHttpRequestResponse#getResponse as a string, manipulate it, and them use IHttpRequestResponse#setResponse(<new response as byte[]>)?

Hannah, PortSwigger Agent | Last updated: Apr 06, 2021 10:56AM UTC