(cacheControl string)
| 308 | ) |
| 309 | |
| 310 | func ValidateCacheControl(cacheControl string) bool { |
| 311 | cacheDirs := strings.Split(cacheControl, ",") |
| 312 | for _, dir := range cacheDirs { |
| 313 | if !contains(cacheControlDir, dir) && !maxAgeRegexp.MatchString(dir) { |
| 314 | log.LogErrorf("invalid cache-control directive: %v", dir) |
| 315 | return false |
| 316 | } |
| 317 | } |
| 318 | return true |
| 319 | } |
| 320 | |
| 321 | func ValidateCacheExpires(expires string) bool { |
| 322 | var err error |
no test coverage detected