From 5f131fafdc64bc1c2dd0b8511cbe181f09ee505d Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 18 Mar 2026 11:41:51 -0700 Subject: [PATCH] fix redirect to use internal url instead of public_url Go's proxyReqToTargetServer builds the redirect Location header from loc.Url (the internal URL), not publicUrl. Using public_url could cause redirect failures when internal and external URLs differ. --- seaweed-volume/src/server/handlers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seaweed-volume/src/server/handlers.rs b/seaweed-volume/src/server/handlers.rs index efc1e0672..1c3574288 100644 --- a/seaweed-volume/src/server/handlers.rs +++ b/seaweed-volume/src/server/handlers.rs @@ -763,7 +763,7 @@ fn redirect_request(info: &ProxyRequestInfo, target: &VolumeLocation, scheme: &s let raw_target = format!( "{}/{},{}?{}", - target.public_url, &info.vid_str, &info.fid_str, query + target.url, &info.vid_str, &info.fid_str, query ); let location = match normalize_outgoing_http_url(scheme, &raw_target) { Ok(url) => url,