New rule syntax
Co-authored-by: jbdoumenjou <jb.doumenjou@gmail.com>
This commit is contained in:
parent
7155f0d50d
commit
9ebe3c38b2
89 changed files with 1111 additions and 1357 deletions
|
@ -7,8 +7,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/containous/alice"
|
||||
"github.com/containous/traefik/config/static"
|
||||
"github.com/containous/traefik/old/types"
|
||||
"github.com/containous/traefik/types"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -24,7 +23,7 @@ type RequestDecorator struct {
|
|||
}
|
||||
|
||||
// New creates a new request host middleware.
|
||||
func New(hostResolverConfig *static.HostResolverConfig) *RequestDecorator {
|
||||
func New(hostResolverConfig *types.HostResolverConfig) *RequestDecorator {
|
||||
requestDecorator := &RequestDecorator{}
|
||||
if hostResolverConfig != nil {
|
||||
requestDecorator.hostResolver = &Resolver{
|
||||
|
|
|
@ -4,7 +4,8 @@ import (
|
|||
"net/http"
|
||||
"testing"
|
||||
|
||||
"github.com/containous/traefik/config/static"
|
||||
"github.com/containous/traefik/types"
|
||||
|
||||
"github.com/containous/traefik/testhelpers"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
@ -90,7 +91,7 @@ func TestRequestFlattening(t *testing.T) {
|
|||
})
|
||||
|
||||
rh := New(
|
||||
&static.HostResolverConfig{
|
||||
&types.HostResolverConfig{
|
||||
CnameFlattening: true,
|
||||
ResolvConfig: "/etc/resolv.conf",
|
||||
ResolvDepth: 5,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue