Manage Headers for the Authentication forwarding.
This commit is contained in:
parent
49e0e20ce2
commit
cb05f36976
10 changed files with 334 additions and 186 deletions
|
@ -27,6 +27,7 @@ import (
|
|||
"github.com/containous/traefik/metrics"
|
||||
"github.com/containous/traefik/middlewares"
|
||||
"github.com/containous/traefik/middlewares/accesslog"
|
||||
mauth "github.com/containous/traefik/middlewares/auth"
|
||||
"github.com/containous/traefik/provider"
|
||||
"github.com/containous/traefik/safe"
|
||||
"github.com/containous/traefik/types"
|
||||
|
@ -282,7 +283,7 @@ func (server *Server) setupServerEntryPoint(newServerEntryPointName string, newS
|
|||
}
|
||||
}
|
||||
if server.globalConfiguration.EntryPoints[newServerEntryPointName].Auth != nil {
|
||||
authMiddleware, err := middlewares.NewAuthenticator(server.globalConfiguration.EntryPoints[newServerEntryPointName].Auth)
|
||||
authMiddleware, err := mauth.NewAuthenticator(server.globalConfiguration.EntryPoints[newServerEntryPointName].Auth)
|
||||
if err != nil {
|
||||
log.Fatal("Error starting server: ", err)
|
||||
}
|
||||
|
@ -935,7 +936,7 @@ func (server *Server) loadConfig(configurations types.Configurations, globalConf
|
|||
auth.Basic = &types.Basic{
|
||||
Users: users,
|
||||
}
|
||||
authMiddleware, err := middlewares.NewAuthenticator(auth)
|
||||
authMiddleware, err := mauth.NewAuthenticator(auth)
|
||||
if err != nil {
|
||||
log.Errorf("Error creating Auth: %s", err)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue