aboutsummaryrefslogtreecommitdiff
path: root/weed/filer/s3iam_conf.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/filer/s3iam_conf.go')
-rw-r--r--weed/filer/s3iam_conf.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/weed/filer/s3iam_conf.go b/weed/filer/s3iam_conf.go
index ce662b969..ea5b1a040 100644
--- a/weed/filer/s3iam_conf.go
+++ b/weed/filer/s3iam_conf.go
@@ -10,7 +10,11 @@ import (
)
func ParseS3ConfigurationFromBytes[T proto.Message](content []byte, config T) error {
- if err := jsonpb.Unmarshal(content, config); err != nil {
+ options := &jsonpb.UnmarshalOptions{
+ DiscardUnknown: true,
+ AllowPartial: true,
+ }
+ if err := options.Unmarshal(content, config); err != nil {
return err
}
return nil