You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-12-01 22:51:45 +02:00
Add convert-config-to-alpha flag to convert existing configuration to alpha structure
This commit is contained in:
@@ -37,3 +37,11 @@ func (a *AlphaOptions) MergeInto(opts *Options) {
|
||||
opts.InjectRequestHeaders = a.InjectRequestHeaders
|
||||
opts.InjectResponseHeaders = a.InjectResponseHeaders
|
||||
}
|
||||
|
||||
// ExtractFrom populates the fields in the AlphaOptions with the values from
|
||||
// the Options
|
||||
func (a *AlphaOptions) ExtractFrom(opts *Options) {
|
||||
a.Upstreams = opts.UpstreamServers
|
||||
a.InjectRequestHeaders = opts.InjectRequestHeaders
|
||||
a.InjectResponseHeaders = opts.InjectResponseHeaders
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user