更新 proxy/rewriter.go

This commit is contained in:
XOF
2025-12-15 04:45:40 +08:00
parent ece227bd73
commit f240eef4e3

View File

@@ -134,12 +134,10 @@ func (r *ContentRewriter) rewriteURL(urlStr string) string {
u = r.baseURL.ResolveReference(u)
}
proxyPath := u.Path
if u.RawQuery != "" {
proxyPath += "?" + u.RawQuery
}
// 保留完整的 URL包括域名
fullURL := u.String()
return "/p/" + r.token + proxyPath
return "/p/" + r.token + "/" + fullURL
}
func (r *ContentRewriter) rewriteSrcset(srcset string) string {