Skip to content

Commit

Permalink
Add cache control headers for root path (#488)
Browse files Browse the repository at this point in the history
  • Loading branch information
swuecho authored Jul 6, 2024
1 parent 33c87c3 commit 3b8ac54
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ func main() {
w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
w.Header().Set("Pragma", "no-cache")
w.Header().Set("Expires", "0")
} else if r.URL.Path == "/" {
w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
w.Header().Set("Pragma", "no-cache")
w.Header().Set("Expires", "0")
}
fs.ServeHTTP(w, r)
})
Expand Down

0 comments on commit 3b8ac54

Please sign in to comment.