Skip to content

Commit

Permalink
Use timestamps in GMT format per RFC2616 (#772)
Browse files Browse the repository at this point in the history
* chore(middleware/nocache): using `http.TimeFormat` instead of `time.RFC1123` while formatting expires header

* fix(middleware/nocache): use utc based time
  • Loading branch information
falentio authored Dec 18, 2022
1 parent 878319e commit e6baba6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/nocache.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

// Unix epoch time
var epoch = time.Unix(0, 0).Format(time.RFC1123)
var epoch = time.Unix(0, 0).UTC().Format(http.TimeFormat)

// Taken from https://github.com/mytrile/nocache
var noCacheHeaders = map[string]string{
Expand Down

0 comments on commit e6baba6

Please sign in to comment.