@@ -20,6 +20,11 @@ func main() {
2020 logger.SetFlags(logger.Lshortfile)
2121
2222 configFlagSet := pflag.NewFlagSet("oauth2-proxy", pflag.ContinueOnError)
23+
24+ // Because we parse early to determine alpha vs legacy config, we have to
25+ // ignore any unknown flags for now
26+ configFlagSet.ParseErrorsWhitelist.UnknownFlags = true
27+
2328 config := configFlagSet.String("config", "", "path to config file")
2429 alphaConfig := configFlagSet.String("alpha-config", "", "path to alpha config file (use at your own risk - the structure in this config file may change between minor releases)")
2530 convertConfig := configFlagSet.Bool("convert-config-to-alpha", false, "if true, the proxy will load configuration as normal and convert existing configuration to the alpha config structure, and print it to stdout")