Update Cache Headers
This commit is contained in:
parent
95c5cdc704
commit
2c5151ee8a
4
main.go
4
main.go
|
@ -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 {
|
||||
|
|
Reference in New Issue