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:
parent
9df3a752a6
commit
ae17e38403
@ -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
|
||||
|
||||
|
5
main.go
5
main.go
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user