Merge pull request #355 from containous/change-PathPrefixStrip-k8s

Replace PathPrefixStrip by PathPrefix in k8s
This commit is contained in:
Vincent Demeester 2016-05-12 13:56:43 +02:00
commit 749b381f26
2 changed files with 6 additions and 6 deletions

View file

@ -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 {

View file

@ -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",