Skip to content

Duplicated route declaration allowed? #478

@Leonardo-Ferreira

Description

@Leonardo-Ferreira

take a look at this sample:

[
    {
    "name" : "example",
    "active" : true,
    "proxy" : {
        "preserve_host" : false,
        "listen_path" : "/example/*",
        "upstreams" : {
            "balancing": "roundrobin",
            "targets": [
                {"target": "http://localhost:8081/echo"}
            ]
        },
        "strip_path" : false,
        "append_path" : false,
        "methods" : ["GET"]
    }
},
{
    "name" : "example2",
    "active" : true,
    "proxy" : {
        "preserve_host" : false,
        "listen_path" : "/example/*",
        "upstreams" : {
            "balancing": "roundrobin",
            "targets": [
                {"target": "http://microsoft.com/"}
            ]
        },
        "strip_path" : false,
        "append_path" : false,
        "methods" : ["GET"]
    }
}
]

it declares 2 apis, with different targets, but the same base path.

This does generate an error, what happens is that the first one is over... in my opinion this should generate an error because in big environments this can lead to bugs and erros that are very difficult to trace

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions