Skip to content

Commit

Permalink
add missing option value
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Richter <[email protected]>
  • Loading branch information
dragonchaser committed Jul 24, 2023
1 parent decf589 commit 75f0f69
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
19 changes: 13 additions & 6 deletions pkg/micro/ocdav/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ type Options struct {
MetricsSubsystem string

// ocdav.* is internal so we need to set config options individually
config config.Config
lockSystem ocdav.LockSystem
AllowCredentials bool
AllowedOrigins []string
AllowedHeaders []string
AllowedMethods []string
config config.Config
lockSystem ocdav.LockSystem
AllowCredentials bool
AllowedOrigins []string
AllowedHeaders []string
AllowedMethods []string
AllowDepthInfinity bool
}

// newOptions initializes the available default options.
Expand Down Expand Up @@ -103,6 +104,12 @@ func Address(val string) Option {
}
}

func AllowDepthInfinity(val bool) Option {
return func(o *Options) {
o.AllowDepthInfinity = val
}
}

// JWTSecret provides a function to set the jwt secret option.
func JWTSecret(s string) Option {
return func(o *Options) {
Expand Down
3 changes: 3 additions & 0 deletions pkg/micro/ocdav/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ func setDefaults(sopts *Options) error {
if sopts.config.VersionString == "" {
sopts.config.VersionString = "0.0.0"
}

sopts.config.AllowPropfindDepthInfinitiy = sopts.AllowDepthInfinity

return nil
}

Expand Down

0 comments on commit 75f0f69

Please sign in to comment.