Skip to content

Commit

Permalink
serve s3 as a proxy server
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikubill authored and saw-jan committed Jan 8, 2024
1 parent fbdf71a commit e81f2a0
Show file tree
Hide file tree
Showing 11 changed files with 469 additions and 94 deletions.
6 changes: 3 additions & 3 deletions backend/webdav/webdav.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
if opt.User != "" || opt.Pass != "" {
f.srv.SetUserPass(opt.User, opt.Pass)
} else if opt.BearerToken != "" {
f.setBearerToken(opt.BearerToken)
f.SetBearerToken(opt.BearerToken)
} else if f.opt.BearerTokenCommand != "" {
err = f.fetchAndSetBearerToken()
if err != nil {
Expand Down Expand Up @@ -512,7 +512,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
}

// sets the BearerToken up
func (f *Fs) setBearerToken(token string) {
func (f *Fs) SetBearerToken(token string) {
f.opt.BearerToken = token
f.srv.SetHeader("Authorization", "Bearer "+token)
}
Expand Down Expand Up @@ -570,7 +570,7 @@ func (f *Fs) fetchAndSetBearerToken() error {
if err != nil {
return err
}
f.setBearerToken(token)
f.SetBearerToken(token)
return nil
}

Expand Down
Loading

0 comments on commit e81f2a0

Please sign in to comment.