Forum Discussion
Mike_Singer_599
Jan 11, 2012Nimbostratus
Removing server header from http to https redirect
We have been asked to remove this by a client based on a pentest. I can find referernces to the noserver option in other posts but not the complete irule that incorrpates that w/ the redirected command. We are just using a redirect command that is very simple as follows:
when HTTP_REQUEST { HTTP::redirect "https://[HTTP::host][HTTP::uri]" }
Does any know what a proper irule would be that does this base redirect w/o adding the server header?
Thanks in advance.
- nitassEmployeecan you try this?
[root@ve1023:Active] config b virtual bar list virtual bar { destination 172.28.19.79:80 ip protocol 6 rules myrule profiles { http {} tcp {} } } [root@ve1023:Active] config b rule myrule list rule myrule { when HTTP_REQUEST { HTTP::respond 302 noserver Location "https://[HTTP::host][HTTP::uri]" } } [root@ve1023:Active] config curl -I http://172.28.19.79/test HTTP/1.0 302 Found Location: https://172.28.19.79/test Connection: Keep-Alive Content-Length: 0
- Colin_Walker_12Historic F5 AccountTo clarify, the iRule portion of Nitass post above is just:
when HTTP_REQUEST { HTTP::respond 302 noserver Location "https://[HTTP::host][HTTP::uri]" }
- Mike_Singer_599NimbostratusThanks nitass and Colin. That did the trick.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects