add missing options
Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
+13
-6
@@ -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.
|
||||
@@ -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) {
|
||||
|
||||
+3
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user