mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-18 22:41:04 +02:00
deref everything... but why?
Signed-off-by: Jan Larwig <jan@larwig.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
middlewareapi "github.com/oauth2-proxy/oauth2-proxy/v7/pkg/apis/middleware"
|
||||
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/apis/options"
|
||||
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/header"
|
||||
"github.com/oauth2-proxy/oauth2-proxy/v7/pkg/util/ptr"
|
||||
)
|
||||
|
||||
func NewRequestHeaderInjector(headers []options.Header) (alice.Constructor, error) {
|
||||
@@ -27,7 +28,7 @@ func NewRequestHeaderInjector(headers []options.Header) (alice.Constructor, erro
|
||||
func newStripHeaders(headers []options.Header) alice.Constructor {
|
||||
headersToStrip := []options.Header{}
|
||||
for _, header := range headers {
|
||||
if !(*header.PreserveRequestValue) {
|
||||
if !ptr.Deref(header.PreserveRequestValue, false) {
|
||||
headersToStrip = append(headersToStrip, header)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user