motiv-labs / janus

An API Gateway written in Go
https://hellofresh.gitbooks.io/janus
MIT License
2.8k stars 320 forks source link

Parameter does not be replaced in the url #275

Open m3ngyang opened 6 years ago

m3ngyang commented 6 years ago

Hi, I had a taste for Janus, and the config is

{
    "name" : "usergroups",
    "active" : true,
    "proxy" : {
        "listen_path" : "/v1/usergroups/{groupId:[\\da-f]{24}}",
        "upstreams" : {
            "balancing": "roundrobin",
            "targets": [
                {"target": "http://service:8080/v1/usergroups/{groupId}"}
            ]
        },
        "methods" : ["GET"]
    }
}

but I got

{
    "code": 400,
    "msg": "resourcequotas \"{groupId}\" not found",
    "data": null
}

It seems that parameter does not be replaced in the target usl?

m3ngyang commented 6 years ago

@italolelis can you answer my question?

m3ngyang commented 6 years ago

It seems the problem of demo docker image, when I use released binary file, it works well.

italolelis commented 6 years ago

@m3ngyang we've updated the docker image to the latest version. There was a problem with it and now should be ok. Would you mind testing it again?