Forum Discussion
Jun 15, 2011
switch not recognizing content type
Hello All,
For some reason my switch is NOT working correctly.
ex)
when HTTP_RESPONSE {
if request is a static file, set cache control to be cac...
Minn_62043
Jun 16, 2011Cirrostratus
There should not be "}" after "image/jpeg".
when HTTP_RESPONSE {
if { [HTTP::header exists Content-Type] } {
switch -glob [HTTP::header Content-Type] {
"text/javascript" -
"text/css"-
"image/gif" -
"image/jpeg" {
HTTP::header replace "Cache-Control" "private, max-age=604800"
}
}
}
}
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