Browse Source

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.
rust-volume-server
Chris Lu 2 days ago
parent
commit
5f131fafdc
  1. 2
      seaweed-volume/src/server/handlers.rs

2
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,

Loading…
Cancel
Save