Fix backend reuse
This commit is contained in:
parent
9cf4e730e7
commit
51227241b7
4 changed files with 94 additions and 8 deletions
|
@ -137,6 +137,13 @@ func WithRoute(name string, rule string) func(*types.Route) string {
|
|||
}
|
||||
}
|
||||
|
||||
// WithBasicAuth is a helper to create a configuration
|
||||
func WithBasicAuth(username string, password string) func(*types.Frontend) {
|
||||
return func(fe *types.Frontend) {
|
||||
fe.BasicAuth = []string{username + ":" + password}
|
||||
}
|
||||
}
|
||||
|
||||
// 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