Forum Discussion
DarkSideOfTheQ_
Nimbostratus
Mar 27, 2009Change content-type and status code
OK, so I've been asked to change the status code and also the content-type for one of our apps. I know I can change the status code, but haven't done anything with changing the content-type. Can I do ...
hoolio
Cirrostratus
Mar 27, 2009You can add headers to the response with HTTP::respond. Also, you can consolidate the server using glob style wildcard matching:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::host]] {
"*server[1-4].mydomain.com" {
HTTP::respond 200 content {%FDF-1.21 0 obj<> >>>>endobjtrailer<>%%EOF} "Content-Type" "application/vnd.fdf"
}
}
}
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
