Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f744d04b0 | |||
| 6c98d03ae7 |
@@ -218,6 +218,10 @@ func (sc *SteamCache) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if strings.HasPrefix(r.URL.String(), "/depot/") {
|
if strings.HasPrefix(r.URL.String(), "/depot/") {
|
||||||
|
// trim the query parameters from the URL path
|
||||||
|
// this is necessary because the cache key should not include query parameters
|
||||||
|
r.URL.Path = strings.Split(r.URL.Path, "?")[0]
|
||||||
|
|
||||||
tstart := time.Now()
|
tstart := time.Now()
|
||||||
defer func() { responseTime.Observe(time.Since(tstart).Seconds()) }()
|
defer func() { responseTime.Observe(time.Since(tstart).Seconds()) }()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user