Pass Client IP address to MinIO on x-forwarded-for header (#2864)

This commit is contained in:
Daniel Valdivia
2023-06-14 12:36:48 -07:00
committed by GitHub
parent fc4263e2f9
commit 4a172fae97
53 changed files with 382 additions and 590 deletions

View File

@@ -22,6 +22,8 @@ import (
"reflect"
"testing"
"github.com/minio/console/pkg/utils"
"github.com/minio/console/models"
"github.com/minio/console/pkg/auth/idp/oauth2"
"github.com/minio/console/pkg/auth/ldap"
@@ -33,7 +35,7 @@ func Test_getSessionResponse(t *testing.T) {
ctx context.Context
session *models.Principal
}
ctx := context.Background()
ctx := context.WithValue(context.Background(), utils.ContextClientIP, "127.0.0.1")
tests := []struct {
name string
args args