jlelse
/
kis3
Archived
1
Fork 0

Update Cache Headers

This commit is contained in:
Jan-Lukas Else 2019-04-27 07:41:55 +02:00
parent 95c5cdc704
commit 2c5151ee8a
1 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ func startListening() {
}
func trackView(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Cache-Control", "max-age=0")
w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate, max-age=0")
url := r.URL.Query().Get("url")
ref := r.URL.Query().Get("ref")
ua := r.Header.Get("User-Agent")
@ -83,7 +83,7 @@ func sendHelloResponse(w http.ResponseWriter, _ *http.Request) {
func serveTrackingScript(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/javascript")
w.Header().Set("Cache-Control", "max-age=432000") // 5 days
w.Header().Set("Cache-Control", "public, max-age=432000") // 5 days
filename := "kis3.js"
file, err := app.staticBox.Open(filename)
if err != nil {