forked from Ivasoft/traefik
Merge pull request #355 from containous/change-PathPrefixStrip-k8s
Replace PathPrefixStrip by PathPrefix in k8s
This commit is contained in:
@@ -166,7 +166,7 @@ func (provider *Kubernetes) loadIngresses(k8sClient k8s.Client) (*types.Configur
|
||||
}
|
||||
if len(pa.Path) > 0 {
|
||||
templateObjects.Frontends[r.Host+pa.Path].Routes[pa.Path] = types.Route{
|
||||
Rule: "PathPrefixStrip:" + pa.Path,
|
||||
Rule: "PathPrefix:" + pa.Path,
|
||||
}
|
||||
}
|
||||
services, err := k8sClient.GetServices(func(service k8s.Service) bool {
|
||||
|
||||
@@ -143,7 +143,7 @@ func TestLoadIngresses(t *testing.T) {
|
||||
PassHostHeader: true,
|
||||
Routes: map[string]types.Route{
|
||||
"/bar": {
|
||||
Rule: "PathPrefixStrip:/bar",
|
||||
Rule: "PathPrefix:/bar",
|
||||
},
|
||||
"foo": {
|
||||
Rule: "Host:foo",
|
||||
@@ -239,7 +239,7 @@ func TestGetPassHostHeader(t *testing.T) {
|
||||
Backend: "foo/bar",
|
||||
Routes: map[string]types.Route{
|
||||
"/bar": {
|
||||
Rule: "PathPrefixStrip:/bar",
|
||||
Rule: "PathPrefix:/bar",
|
||||
},
|
||||
"foo": {
|
||||
Rule: "Host:foo",
|
||||
@@ -423,7 +423,7 @@ func TestLoadNamespacedIngresses(t *testing.T) {
|
||||
PassHostHeader: true,
|
||||
Routes: map[string]types.Route{
|
||||
"/bar": {
|
||||
Rule: "PathPrefixStrip:/bar",
|
||||
Rule: "PathPrefix:/bar",
|
||||
},
|
||||
"foo": {
|
||||
Rule: "Host:foo",
|
||||
@@ -651,7 +651,7 @@ func TestLoadMultipleNamespacedIngresses(t *testing.T) {
|
||||
PassHostHeader: true,
|
||||
Routes: map[string]types.Route{
|
||||
"/bar": {
|
||||
Rule: "PathPrefixStrip:/bar",
|
||||
Rule: "PathPrefix:/bar",
|
||||
},
|
||||
"foo": {
|
||||
Rule: "Host:foo",
|
||||
@@ -672,7 +672,7 @@ func TestLoadMultipleNamespacedIngresses(t *testing.T) {
|
||||
PassHostHeader: true,
|
||||
Routes: map[string]types.Route{
|
||||
"/quix": {
|
||||
Rule: "PathPrefixStrip:/quix",
|
||||
Rule: "PathPrefix:/quix",
|
||||
},
|
||||
"awesome": {
|
||||
Rule: "Host:awesome",
|
||||
|
||||
Reference in New Issue
Block a user