Forum Discussion
How to change Server header sent by HTTP::redirect ?
Hi,
I'm using a very simple iRule to redirect http traffic to https URL. But the response contains a Server header with BigIP as value. How can I change this?
Here is the iRule I'm using:
when HTTP_REQUEST {
HTTP::redirect "https://some.web.site?target=[URI::encode http://[HTTP::host][HTTP::uri]]"
}
Here is the response I get:
HTTP/1.0 302 Found
Location: https://some.web.site?target=http%3a%2f%2fblah%2f
Server: BigIP
Connection: close
Content-Length: 0
I'd like to replace BigIP by some.web.site. I've tried the following but it is not working...
when HTTP_RESPONSE {
HTTP::header replace Server "some.web.site"
}
Is it possible? Any suggestion?
Thanks, Christophe
You can change the server header in the HTTP profile. It is configurable in version 11.5+ I believe.
- Michael_Jenkins
Cirrostratus
Try using HTTP::respond instead and manually specifying the server header (or you can use
to remove it completely)noserver
HTTP::respond 302 Location ""https://some.web.site?target=[URI::encode http://[HTTP::host][HTTP::uri]]" "Server" "some.web.site"
- Brad_Parker_139
Nacreous
You can change the server header in the HTTP profile. It is configurable in version 11.5+ I believe.
- Brad_Parker_139
Nacreous
server-agent-name is the property. - This is working too, thanks!
- Brad_Parker
Cirrus
You can change the server header in the HTTP profile. It is configurable in version 11.5+ I believe.
- Brad_Parker
Cirrus
server-agent-name is the property. - This is working too, thanks!
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