mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-11-25 03:15:19 +08:00
fix(openlist_driver): ensure UA is correctly propagated (#1679)
This commit is contained in:
@@ -117,7 +117,7 @@ func (d *OpenList) Link(ctx context.Context, file model.Obj, args model.LinkArgs
|
|||||||
if d.PassUAToUpsteam {
|
if d.PassUAToUpsteam {
|
||||||
userAgent := args.Header.Get("user-agent")
|
userAgent := args.Header.Get("user-agent")
|
||||||
if userAgent != "" {
|
if userAgent != "" {
|
||||||
headers["User-Agent"] = base.UserAgent
|
headers["User-Agent"] = userAgent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if PassIPToUpsteam is true, then pass the ip address to the upstream
|
// if PassIPToUpsteam is true, then pass the ip address to the upstream
|
||||||
|
|||||||
Reference in New Issue
Block a user