You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "kellyseeme (via GitHub)" <gi...@apache.org> on 2023/04/03 11:35:52 UTC
[GitHub] [apisix] kellyseeme opened a new issue, #9232: how to do suffix match
kellyseeme opened a new issue, #9232:
URL: https://github.com/apache/apisix/issues/9232
### Description
in nginx this is a settings like :
location ~* .*\.(gif|jpg|jpeg|png|css|js|ico)$ {
proxy_pass server
how to set this in apisix?
### Environment
- APISIX version (run `apisix version`):2.15.1
- 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] kellyseeme closed issue #9232: how to do suffix match
Posted by "kellyseeme (via GitHub)" <gi...@apache.org>.
kellyseeme closed issue #9232: how to do suffix match
URL: https://github.com/apache/apisix/issues/9232
--
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] kingluo commented on issue #9232: how to do suffix match
Posted by "kingluo (via GitHub)" <gi...@apache.org>.
kingluo commented on issue #9232:
URL: https://github.com/apache/apisix/issues/9232#issuecomment-1499873931
@kellyseeme
You could add uri matching rule in the route cfg.
```bash
curl http://127.0.0.1:9180/apisix/admin/routes/1 \
-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
{
"methods": ["GET"],
"uri": "/*",
"vars": [
["uri", "~~", "\\.(gif|jpg|jpeg|png|css|js|ico)$"]
],
"upstream": {
"type": "roundrobin",
"nodes": {
"httpbin.org": 1
}
}
}'
-- other rules ...
curl http://127.0.0.1:9180/apisix/admin/routes/2 \
-H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -i -d '
{
"methods": ["GET"],
"uri": "/get",
"upstream": {
"type": "roundrobin",
"nodes": {
"httpbin.org": 1
}
}
}'
```
--
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