From f240eef4e3fc9756ba325acdeb35824a4537d3fd Mon Sep 17 00:00:00 2001 From: XOF Date: Mon, 15 Dec 2025 04:45:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20proxy/rewriter.go?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proxy/rewriter.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/proxy/rewriter.go b/proxy/rewriter.go index 69e7228..891f71a 100644 --- a/proxy/rewriter.go +++ b/proxy/rewriter.go @@ -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 {