Skip to content

Commit 9e49adc

Browse files
authored
fix(drivers/openlist): pass through frontend refresh flag (#2307)
* fix(drivers/openlist): pass through frontend refresh flag * fix(drivers/openlist): gate refresh flag forwarding by config
1 parent 9fdba3a commit 9e49adc

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

drivers/openlist/driver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ func (d *OpenList) List(ctx context.Context, dir model.Obj, args model.ListArgs)
8484
},
8585
Path: dir.GetPath(),
8686
Password: d.MetaPassword,
87-
Refresh: false,
87+
Refresh: d.PassRefreshFlagToUpsteam && args.Refresh,
8888
})
8989
})
9090
if err != nil {

drivers/openlist/meta.go

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ import (
77

88
type Addition struct {
99
driver.RootPath
10-
Address string `json:"url" required:"true"`
11-
MetaPassword string `json:"meta_password"`
12-
Username string `json:"username"`
13-
Password string `json:"password"`
14-
Token string `json:"token"`
15-
PassIPToUpsteam bool `json:"pass_ip_to_upsteam" default:"true"`
16-
PassUAToUpsteam bool `json:"pass_ua_to_upsteam" default:"true"`
17-
ForwardArchiveReq bool `json:"forward_archive_requests" default:"true"`
10+
Address string `json:"url" required:"true"`
11+
MetaPassword string `json:"meta_password"`
12+
Username string `json:"username"`
13+
Password string `json:"password"`
14+
Token string `json:"token"`
15+
PassIPToUpsteam bool `json:"pass_ip_to_upsteam" default:"true"`
16+
PassUAToUpsteam bool `json:"pass_ua_to_upsteam" default:"true"`
17+
ForwardArchiveReq bool `json:"forward_archive_requests" default:"true"`
18+
PassRefreshFlagToUpsteam bool `json:"pass_refresh_flag_to_upsteam" default:"false"`
1819
}
1920

2021
var config = driver.Config{

0 commit comments

Comments
 (0)