serve s3: pre-merge tweaks
- Changes - Rename `--s3-authkey` to `--auth-key` to get it out of the s3 backend namespace - Enable `Content-MD5` integrity checks - Remove locking after code audit - Documentation - Factor out documentation into seperate file - Add Quickstart to docs - Add Bugs section to docs - Add experimental tag to docs - Add rclone provider to s3 backend docs - Fixes - Correct quirks in s3 backend - Change fmt.Printlns into fs.Logs - Make metadata storage per backend not global - Log on startup if anonymous access is enabled - Coding style fixes - rename fs to vfs to save confusion with the rest of rclone code - rename db to b for *s3Backend Fixes #7062
This commit is contained in:
parent
a2c4f07a57
commit
93f35c915a
11 changed files with 831 additions and 172 deletions
|
@ -45,6 +45,10 @@ func newServer(ctx context.Context, f fs.Fs, opt *Options) (s *Server, err error
|
|||
vfs: vfs.New(f, &vfsflags.Opt),
|
||||
}
|
||||
|
||||
if len(opt.authPair) == 0 {
|
||||
fs.Logf("serve s3", "No auth provided so allowing anonymous access")
|
||||
}
|
||||
|
||||
var newLogger logger
|
||||
w.faker = gofakes3.New(
|
||||
newBackend(w.vfs, opt),
|
||||
|
@ -53,6 +57,7 @@ func newServer(ctx context.Context, f fs.Fs, opt *Options) (s *Server, err error
|
|||
gofakes3.WithRequestID(rand.Uint64()),
|
||||
gofakes3.WithoutVersioning(),
|
||||
gofakes3.WithV4Auth(authlistResolver(opt.authPair)),
|
||||
gofakes3.WithIntegrityCheck(true), // Check Content-MD5 if supplied
|
||||
)
|
||||
|
||||
w.Server, err = httplib.NewServer(ctx,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue