Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated route declaration allowed? #478

Open
Leonardo-Ferreira opened this issue May 18, 2021 · 0 comments
Open

Duplicated route declaration allowed? #478

Leonardo-Ferreira opened this issue May 18, 2021 · 0 comments

Comments

@Leonardo-Ferreira
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant