Auth support in frontends for k8s and file
This commit is contained in:
parent
e8e36bd9d5
commit
bb14ec70bd
14 changed files with 867 additions and 181 deletions
|
@ -138,12 +138,20 @@ func WithRoute(name string, rule string) func(*types.Route) string {
|
|||
}
|
||||
|
||||
// WithBasicAuth is a helper to create a configuration
|
||||
// Deprecated
|
||||
func WithBasicAuth(username string, password string) func(*types.Frontend) {
|
||||
return func(fe *types.Frontend) {
|
||||
fe.BasicAuth = []string{username + ":" + password}
|
||||
}
|
||||
}
|
||||
|
||||
// WithFrontEndAuth is a helper to create a configuration
|
||||
func WithFrontEndAuth(auth *types.Auth) func(*types.Frontend) {
|
||||
return func(fe *types.Frontend) {
|
||||
fe.Auth = auth
|
||||
}
|
||||
}
|
||||
|
||||
// WithLBSticky is a helper to create a configuration
|
||||
func WithLBSticky(cookieName string) func(*types.Backend) {
|
||||
return func(b *types.Backend) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue