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 cached on the client machine for 7 days
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"
}
}
}
Any thoughts why this is happening?
Regards,
TRX
- Thanks. I'll try that and let you know my results.
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