MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / RemoveBrowserCache

Method RemoveBrowserCache

agent/utils/nginx/components/location.go:315–321  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

313}
314
315func (l *Location) RemoveBrowserCache() {
316 l.RemoveDirectiveByFullParams("if", []string{"(", "$uri", "~*", `"\.(gif|png|jpg|css|js|woff|woff2)$"`, ")"})
317 l.RemoveDirectiveByFullParams("if", []string{"(", "$uri", "~*", `"\.(gif|png|jpg|css|js|woff|woff2|jpeg|svg|webp|avif)$"`, ")"})
318 l.RemoveDirective("add_header", []string{"Cache-Control", "no-cache"})
319 l.CacheTime = 0
320 l.CacheUint = ""
321}
322
323func (l *Location) RemoveServerCache(cacheKey string) {
324 l.RemoveDirective("proxy_ignore_headers", []string{"Set-Cookie", "Cache-Control", "expires"})

Callers 1

OperateProxyMethod · 0.95

Calls 2

RemoveDirectiveMethod · 0.95

Tested by

no test coverage detected