mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-22 13:39:24 -06:00
explain flags
This commit is contained in:
@@ -225,7 +225,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
Destination: &cfg.AutoprovisionAccounts,
|
||||
},
|
||||
|
||||
// Presigned URLs
|
||||
// Pre Signed URLs
|
||||
&cli.StringSliceFlag{
|
||||
Name: "presignedurl-allow-method",
|
||||
Value: cli.NewStringSlice("GET"),
|
||||
@@ -251,9 +251,8 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
|
||||
|
||||
// Reva Middlewares Config
|
||||
&cli.StringSliceFlag{
|
||||
Name: "proxy-user-agent-whitelist", // TODO naming?
|
||||
Value: cli.NewStringSlice(""),
|
||||
Usage: "TODO",
|
||||
Name: "proxy-user-agent-whitelist",
|
||||
Usage: "--user-agent-whitelist=mirall:basic,foo:bearer Given a tuple of [UserAgent:challenge] it locks a given user agent to the authentication challenge. Particularly useful for old clients whose USer-Agent is known and only support one authentication challenge. When this flag is set in the proxy it configures the authentication middlewares.",
|
||||
EnvVars: []string{"PROXY_MIDDLEWARE_AUTH_CREDENTIALS_BY_USER_AGENT"},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ func Frontend(cfg *config.Config) *cli.Command {
|
||||
|
||||
cfg.Reva.Frontend.Middleware.Auth.CredentialsByUserAgent = make(map[string]string, 0)
|
||||
uaw := c.StringSlice("user-agent-whitelist")
|
||||
fmt.Printf("\n\n%v\n\n", uaw)
|
||||
for _, v := range uaw {
|
||||
parts := strings.Split(v, ":")
|
||||
if len(parts) != 2 {
|
||||
|
||||
@@ -136,9 +136,8 @@ func FrontendWithConfig(cfg *config.Config) []cli.Flag {
|
||||
|
||||
// Reva Middlewares Config
|
||||
&cli.StringSliceFlag{
|
||||
Name: "user-agent-whitelist", // TODO naming?
|
||||
Value: cli.NewStringSlice("test"),
|
||||
Usage: "TODO",
|
||||
Name: "user-agent-whitelist",
|
||||
Usage: "--user-agent-whitelist=mirall:basic,foo:bearer Given a tuple of comma separated [UserAgent:challenge] values, it locks a given user agent to the authentication challenge. Particularly useful for old clients whose USer-Agent is known and only support one authentication challenge. When this flag is set in the storage-frontend it configures Reva.",
|
||||
EnvVars: []string{"STORAGE_FRONTEND_MIDDLEWARE_AUTH_CREDENTIALS_BY_USER_AGENT"},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user