2021-12-22 10:52:02 +00:00
|
|
|
package api
|
|
|
|
|
2022-03-15 13:53:24 +00:00
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
)
|
2021-12-22 10:52:02 +00:00
|
|
|
|
2022-03-15 13:53:24 +00:00
|
|
|
func NoCache(handler http.Handler) http.Handler {
|
|
|
|
return http.HandlerFunc(func(writer http.ResponseWriter, request *http.Request) {
|
|
|
|
writer.Header().Set("Cache-Control", "no-cache")
|
|
|
|
handler.ServeHTTP(writer, request)
|
|
|
|
})
|
2021-12-22 10:52:02 +00:00
|
|
|
}
|