fix(alias): add api prefix for proxy url (close #4392)

This commit is contained in:
Noah Hsu
2023-05-19 00:12:17 +08:00
parent 63de65be45
commit 571bcf07b0
6 changed files with 21 additions and 13 deletions

View File

@ -103,7 +103,8 @@ func (d *Alias) link(ctx context.Context, dst, sub string, args model.LinkArgs)
}
if common.ShouldProxy(storage, stdpath.Base(sub)) {
return &model.Link{
URL: fmt.Sprintf("/p%s?sign=%s",
URL: fmt.Sprintf("%s/p%s?sign=%s",
common.GetApiUrl(args.HttpReq),
utils.EncodePath(reqPath, true),
sign.Sign(reqPath)),
}, nil