更新 proxy/rewriter.go
This commit is contained in:
@@ -134,12 +134,10 @@ func (r *ContentRewriter) rewriteURL(urlStr string) string {
|
|||||||
u = r.baseURL.ResolveReference(u)
|
u = r.baseURL.ResolveReference(u)
|
||||||
}
|
}
|
||||||
|
|
||||||
proxyPath := u.Path
|
// 保留完整的 URL(包括域名)
|
||||||
if u.RawQuery != "" {
|
fullURL := u.String()
|
||||||
proxyPath += "?" + u.RawQuery
|
|
||||||
}
|
|
||||||
|
|
||||||
return "/p/" + r.token + proxyPath
|
return "/p/" + r.token + "/" + fullURL
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *ContentRewriter) rewriteSrcset(srcset string) string {
|
func (r *ContentRewriter) rewriteSrcset(srcset string) string {
|
||||||
|
|||||||
Reference in New Issue
Block a user