Skip to content

Commit

Permalink
default no cache
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan13888 <29968201+Nathan13888@users.noreply.github.com>
  • Loading branch information
Nathan13888 committed Jan 8, 2022
1 parent 728ddec commit 12ceaf5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions server.go
Expand Up @@ -151,9 +151,10 @@ func getBadge(w http.ResponseWriter, r *http.Request) {
})

date := time.Now().Add(time.Minute * -10).Format(http.TimeFormat)
expiry := time.Now().Add(time.Minute * 10).Format(http.TimeFormat)
if len(qryParam("non-unique", r, "")) > 0 {
expiry = date
expiry := date
if len(qryParam("unique", r, "")) > 0 {
expiry = time.Now().Add(time.Minute * 10).Format(http.TimeFormat)
} else {
w.Header().Set("Cache-Control", "no-cache,max-age=0")
}

Expand Down

0 comments on commit 12ceaf5

Please sign in to comment.