mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
Make url on space.read work with base url (#300)
This commit is contained in:
@@ -355,6 +355,11 @@ func (s *Space) Read(ctx context.Context, req *api.Request, rsp *api.Response) e
|
|||||||
log.Errorf("Error presigning url %s", err)
|
log.Errorf("Error presigning url %s", err)
|
||||||
return errors.InternalServerError(method, "Error reading object")
|
return errors.InternalServerError(method, "Error reading object")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// replace hostname or url with our base
|
||||||
|
split := strings.SplitN(urlStr, s.conf.Endpoint, 2)
|
||||||
|
urlStr = s.conf.BaseURL + split[1]
|
||||||
|
|
||||||
rsp.Header = map[string]*api.Pair{
|
rsp.Header = map[string]*api.Pair{
|
||||||
"Location": {
|
"Location": {
|
||||||
Key: "Location",
|
Key: "Location",
|
||||||
|
|||||||
Reference in New Issue
Block a user