You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "bin-53 (via GitHub)" <gi...@apache.org> on 2023/07/26 05:22:25 UTC
[GitHub] [apisix] bin-53 opened a new issue, #9904: public-api 404
bin-53 opened a new issue, #9904:
URL: https://github.com/apache/apisix/issues/9904
### Description
When I set up a public-api plugin in a normal route, the route goes back directly to the 404
my steps:
1.set route config:
```
{
"id": "471122704460677830",
"create_time": 1690340614,
"update_time": 1690348433,
"uri": "/apisixtest/*",
"name": "apisix_test",
"priority": 12,
"methods": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"OPTIONS"
],
"plugins": {
"proxy-rewrite": {
"regex_uri": [
"^/apisixtest(/|$)(.*)",
"/$2"
]
}
},
"upstream": {
"nodes": [
{
"host": "192.168.88.66",
"port": 9081,
"weight": 1
}
],
"retries": 2,
"timeout": {
"connect": 6,
"send": 6,
"read": 6
},
"type": "roundrobin",
"scheme": "http",
"pass_host": "pass",
"keepalive_pool": {
"idle_timeout": 60,
"requests": 1000,
"size": 320
},
"retry_timeout": 2
},
"status": 1
}
```
Normal access:

2.update the route ,add the public-api:
```
{
"id": "471122704460677830",
"create_time": 1690340614,
"update_time": 1690348814,
"uri": "/apisixtest/*",
"name": "apisix_test",
"priority": 12,
"methods": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"OPTIONS"
],
"plugins": {
"proxy-rewrite": {
"regex_uri": [
"^/apisixtest(/|$)(.*)",
"/$2"
]
},
"public-api": {
"disable": false,
"url": "/apisix/plugin/jwt/sign"
}
},
"upstream": {
"nodes": [
{
"host": "192.168.88.66",
"port": 9081,
"weight": 1
}
],
"retries": 2,
"timeout": {
"connect": 6,
"send": 6,
"read": 6
},
"type": "roundrobin",
"scheme": "http",
"pass_host": "pass",
"keepalive_pool": {
"idle_timeout": 60,
"requests": 1000,
"size": 320
},
"retry_timeout": 2
},
"status": 1
}
```

Where is the problem, is it the wrong way to use it?
### Environment
- APISIX version (run `apisix version`):2.15
- Operating system (run `uname -a`):
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
- etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
- APISIX Dashboard version, if relevant:
- Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run `luarocks --version`):
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Revolyssup commented on issue #9904: public-api 404
Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on issue #9904:
URL: https://github.com/apache/apisix/issues/9904#issuecomment-1651068283
@bin-53 In your public-api configuration, it says `url` and it should be `uri`
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] bin-53 closed issue #9904: public-api 404
Posted by "bin-53 (via GitHub)" <gi...@apache.org>.
bin-53 closed issue #9904: public-api 404
URL: https://github.com/apache/apisix/issues/9904
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] bin-53 commented on issue #9904: public-api 404
Posted by "bin-53 (via GitHub)" <gi...@apache.org>.
bin-53 commented on issue #9904:
URL: https://github.com/apache/apisix/issues/9904#issuecomment-1651154675
>
tks
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] Revolyssup commented on issue #9904: public-api 404
Posted by "Revolyssup (via GitHub)" <gi...@apache.org>.
Revolyssup commented on issue #9904:
URL: https://github.com/apache/apisix/issues/9904#issuecomment-1651005568
@bin-53 You have set the route in public-api configuration as `/apisix/plugin/jwt/sign` but you are sending the request to `/apisixtest/login` that is why you get 404.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org