1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-02-09 13:46:51 +02:00

Ensure config flags get parsed correctly when other flags preceed them

This commit is contained in:
Joel Speed 2021-02-06 15:21:12 +00:00
parent 9df3a752a6
commit ae17e38403
No known key found for this signature in database
GPG Key ID: 6E80578D6751DEFB
2 changed files with 6 additions and 0 deletions

View File

@ -9,6 +9,7 @@
## Changes since v7.0.0
- [#1020](https://github.com/oauth2-proxy/oauth2-proxy/pull/1020) Flatten array-based response headers (@NickMeves)
- [#1026](https://github.com/oauth2-proxy/oauth2-proxy/pull/1026) Ensure config flags get parsed correctly when other flags preceed them (@JoelSpeed)
# V7.0.0

View File

@ -20,6 +20,11 @@ func main() {
logger.SetFlags(logger.Lshortfile)
configFlagSet := pflag.NewFlagSet("oauth2-proxy", pflag.ContinueOnError)
// Because we parse early to determine alpha vs legacy config, we have to
// ignore any unknown flags for now
configFlagSet.ParseErrorsWhitelist.UnknownFlags = true
config := configFlagSet.String("config", "", "path to config file")
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)")
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")