You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2019/12/06 09:02:33 UTC
[GitHub] [incubator-apisix] membphis commented on issue #941: bug: key-auth使用报错
membphis commented on issue #941: bug: key-auth使用报错
URL: https://github.com/apache/incubator-apisix/issues/941#issuecomment-562491002
If the api-key is `123456`, the `consumer` should be:
```
-- create new consumer
{
"username": "jack",
"plugins": {
"key-auth": {
"key": "123456"
}
}
}
```
```
-- enable consumer in route
{
"uris": [
"/hello"
],
"upstream_id": "00000000000000000020",
"desc": "flask hello",
"plugins": {
"key-auth": {}
}
}
```
make a test:
```
curl http://10.0.10.226:9080/hello -H 'apikey: 123456' -i
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services