Merge pull request #2210 from versity/ben/middleware

feat: add options extensions to embed config
This commit is contained in:
Ben McClelland
2026-06-24 10:40:46 -07:00
committed by GitHub
+8
View File
@@ -452,6 +452,11 @@ type Config struct {
// this feature is disabled.
SigHup <-chan struct{}
// S3Options are appended to the internally built s3api options before the
// S3 server is created. This allows callers to inject custom behavior such
// as request middleware.
S3Options []s3api.Option
// Version, Build, and BuildTime are displayed in the startup banner.
// All three are optional; omit or leave empty to suppress the field.
Version string
@@ -619,6 +624,9 @@ func RunVersityGW(ctx context.Context, be backend.Backend, cfg *Config) error {
if cfg.DisableACLs {
opts = append(opts, s3api.WithDisableACL())
}
if len(cfg.S3Options) > 0 {
opts = append(opts, cfg.S3Options...)
}
if cfg.Debug {
debuglogger.SetDebugEnabled()
}