mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-09 05:28:56 -06:00
Rename "Cache" middleware to "NoCache"
This commit is contained in:
@@ -5,8 +5,8 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Cache writes required cache headers to all requests.
|
||||
func Cache(next http.Handler) http.Handler {
|
||||
// NoCache writes required cache headers to all requests.
|
||||
func NoCache(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Cache-Control", "no-cache, no-store, max-age=0, must-revalidate, value")
|
||||
w.Header().Set("Expires", "Thu, 01 Jan 1970 00:00:00 GMT")
|
||||
|
||||
Reference in New Issue
Block a user