Forum Discussion
Is it possible to remove "WWW-Authenticate" and "Connection" headers from HTTP::respond 401?
Hi All,
I am out of ideas regarding following issue. I have a response from backend servers with status code 200 and something as payload. I need to craft new response with status code 401 with same headers and different payload. Currently I am using HTTP::respond unfortunately it adds more headers than I need and I must remove them somehow (it is mandatory for me to not have them).
So is it possible to remove default headers from response when I call HTTP:respond?
HTTP::respond 401 content {top secret payload} noserver header1 header1 ....
I need to remove:
WWW-Authenticate: Basic realm=""
Connection: Keep-Alive
I also tried to workaround it with HTTP::payload, but can't find how to rewrite status code from 200 to 401
when HTTP_RESPONSE_DATA {
HTTP::payload replace 0 $content-lenght {top secret payload}
}
Thank you in advance!
1 Reply
- ekaleido
Cirrus
when HTTP_RESPONSE {
HTTP::header remove WWW-Authenticate
HTTP::header remove Connection
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com