fix(backend): cachepath start with '/'

This commit is contained in:
ShiKhu 2021-08-07 17:50:54 +08:00
parent e4a735ce9f
commit 917e81a131

View file

@ -57,7 +57,7 @@ func GetFullCachableURL(baseURL string, relativeURL string) (string, bool) {
const OPENREPLAY_QUERY_START = "OPENREPLAY_QUERY"
func getCachePath(rawurl string) string {
return strings.ReplaceAll(url.QueryEscape(rawurl), "%", "!") // s3 keys are ok with "!"
return "/" + strings.ReplaceAll(url.QueryEscape(rawurl), "%", "!") // s3 keys are ok with "!"
// u, _ := url.Parse(rawurl)
// s := "/" + u.Scheme + "/" + u.Hostname() + u.Path
// if u.RawQuery != "" {