Merge branch 'master' into inbuilt-proxy
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> # Conflicts: # Dockerfile # internal/outpost/ak/api.go # internal/outpost/ak/api_uag.go # internal/outpost/ak/global.go # internal/outpost/ldap/api_tls.go # internal/outpost/ldap/instance_bind.go # internal/outpost/ldap/utils.go # internal/outpost/proxy/api_bundle.go # outpost/go.mod # outpost/go.sum # outpost/pkg/ak/cert.go
This commit is contained in:
@ -12,8 +12,8 @@ import (
|
||||
"github.com/google/uuid"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/recws-org/recws"
|
||||
"goauthentik.io/internal/constants"
|
||||
"goauthentik.io/api"
|
||||
"goauthentik.io/internal/constants"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
@ -40,10 +40,11 @@ type APIController struct {
|
||||
// NewAPIController initialise new API Controller instance from URL and API token
|
||||
func NewAPIController(akURL url.URL, token string) *APIController {
|
||||
config := api.NewConfiguration()
|
||||
config.UserAgent = constants.OutpostUserAgent()
|
||||
config.Host = akURL.Host
|
||||
config.Scheme = akURL.Scheme
|
||||
config.HTTPClient = &http.Client{
|
||||
Transport: SetUserAgent(GetTLSTransport(), constants.OutpostUserAgent()),
|
||||
Transport: GetTLSTransport(),
|
||||
}
|
||||
config.AddDefaultHeader("Authorization", fmt.Sprintf("Bearer %s", token))
|
||||
|
||||
|
Reference in New Issue
Block a user