Skip to content

Commit

Permalink
Merge pull request #51 from clearcodecn/fix-cache-request-missing-header
Browse files Browse the repository at this point in the history
copy request header when check static files
  • Loading branch information
zhyale authored Oct 28, 2023
2 parents 8a62479 + bcbb46b commit 0e94e21
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gateway/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,10 @@ func ReverseHandlerFunc(w http.ResponseWriter, r *http.Request) {
utils.DebugPrintln("Check Update NewRequest", err)
}
if err == nil {
// copy header.
for k := range r.Header {
req.Header.Set(k, r.Header.Get(k))
}
req.Header.Set("Host", domainStr)
modTimeGMT := fi.ModTime().UTC().Format(http.TimeFormat)
//If-Modified-Since: Sun, 14 Jun 2020 13:54:20 GMT
Expand Down

0 comments on commit 0e94e21

Please sign in to comment.