更新 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) 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 {