You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by GitBox <gi...@apache.org> on 2022/03/01 00:58:36 UTC
[GitHub] [incubator-shenyu] ZhangJiaLei123 opened a new issue #2951: [Question] Routing rules
ZhangJiaLei123 opened a new issue #2951:
URL: https://github.com/apache/incubator-shenyu/issues/2951
### Question
I want a connection like this, how can I do it?
``` url
getway: http://host:ip/AppName/api/xxx => client: http://host:ip/api/xxx
```
--
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@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-shenyu] ZhangJiaLei123 edited a comment on issue #2951: [Question] Selector & rule
Posted by GitBox <gi...@apache.org>.
ZhangJiaLei123 edited a comment on issue #2951:
URL: https://github.com/apache/incubator-shenyu/issues/2951#issuecomment-1060331029
Does contextPath have the same curl registration as Divide?
```json
{
"pluginName": "contextPath",
"selectorHandler": "[{\"upstreamUrl\":\"127.0.0.1:8507\"}]",
"conditionDataList": [{
"paramType": "uri",
"operator": "match",
"paramValue": "/AppName/**"
}],
"ruleDataList": [{
"ruleHandler": "{\"loadBalance\":\"random\"}",
"conditionDataList": [{
"paramType": "uri",
"operator": "match",
"paramValue": "/AppName/**"
}]
}]
}
```
It doesn't work.
```json
{
"code": -107,
"message": "divide:Can not find selector, please check your configuration!",
"data": null
}
```
--
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@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-shenyu] ZhangJiaLei123 edited a comment on issue #2951: [Question] Selector & rule (contextPath)
Posted by GitBox <gi...@apache.org>.
ZhangJiaLei123 edited a comment on issue #2951:
URL: https://github.com/apache/incubator-shenyu/issues/2951#issuecomment-1060331029
I set it
* divide config
```json
{
"pluginName": "divide",
"selectorHandler": "[{\"upstreamUrl\":\"127.0.0.1:8507\"}]",
"conditionDataList": [{
"paramType": "uri",
"operator": "match",
"paramValue": "/hnsp/**"
}],
"ruleDataList": [{
"ruleHandler": "{\"loadBalance\":\"random\"}",
"conditionDataList": [{
"paramType": "uri",
"operator": "match",
"paramValue": "/hnsp/**"
}]
}]
}
```
* contextPath config
```
{
"pluginName": "contextPath",
"conditionDataList": [{
"paramType": "uri",
"operator": "match",
"paramValue": "/app/**"
}],
"ruleDataList": [{
"ruleHandler": "{\"contextPath\":\"/app\"}",
"conditionDataList": [{
"paramType": "uri",
"operator": "match",
"paramValue": "/app/**"
}]
}]
}
```
I can successed on '127.0.0.1:9195/hnsp/uaccess/logintest',
failed on '127.0.0.1:9195/app/hnsp/uaccess/logintest'.
error info:
```
{
"code": -107,
"message": "divide:Can not find selector, please check your configuration!",
"data": null
}
```

--
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@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-shenyu] ZhangJiaLei123 commented on issue #2951: [Question] Selector & rule
Posted by GitBox <gi...@apache.org>.
ZhangJiaLei123 commented on issue #2951:
URL: https://github.com/apache/incubator-shenyu/issues/2951#issuecomment-1060331029
Does contextPath have the same curl registration as Divide?
It doesn't work.
```json
{
"pluginName": "contextPath",
"selectorHandler": "[{\"upstreamUrl\":\"127.0.0.1:8507\"}]",
"conditionDataList": [{
"paramType": "uri",
"operator": "match",
"paramValue": "/AppName/**"
}],
"ruleDataList": [{
"ruleHandler": "{\"loadBalance\":\"random\"}",
"conditionDataList": [{
"paramType": "uri",
"operator": "match",
"paramValue": "/AppName/**"
}]
}]
}
```
return
```json
{
"code": -107,
"message": "divide:Can not find selector, please check your configuration!",
"data": null
}
```
--
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@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-shenyu] ZhangJiaLei123 edited a comment on issue #2951: [Question] Selector & rule (contextPath)
Posted by GitBox <gi...@apache.org>.
ZhangJiaLei123 edited a comment on issue #2951:
URL: https://github.com/apache/incubator-shenyu/issues/2951#issuecomment-1060331029
Does contextPath have the same curl registration as Divide?
```json
{
"pluginName": "contextPath",
"selectorHandler": "[{\"upstreamUrl\":\"127.0.0.1:8507\"}]",
"conditionDataList": [{
"paramType": "uri",
"operator": "match",
"paramValue": "/AppName/**"
}],
"ruleDataList": [{
"ruleHandler": "{\"loadBalance\":\"random\"}",
"conditionDataList": [{
"paramType": "uri",
"operator": "match",
"paramValue": "/AppName/**"
}]
}]
}
```
ip:9195/AppName/hnsp/uaccess/logintest
It doesn't work.
```json
{
"code": -107,
"message": "divide:Can not find selector, please check your configuration!",
"data": null
}
```

--
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@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-shenyu] ZhangJiaLei123 edited a comment on issue #2951: [Question] Selector & rule
Posted by GitBox <gi...@apache.org>.
ZhangJiaLei123 edited a comment on issue #2951:
URL: https://github.com/apache/incubator-shenyu/issues/2951#issuecomment-1060331029
Does contextPath have the same curl registration as Divide?
```json
{
"pluginName": "contextPath",
"selectorHandler": "[{\"upstreamUrl\":\"127.0.0.1:8507\"}]",
"conditionDataList": [{
"paramType": "uri",
"operator": "match",
"paramValue": "/AppName/**"
}],
"ruleDataList": [{
"ruleHandler": "{\"loadBalance\":\"random\"}",
"conditionDataList": [{
"paramType": "uri",
"operator": "match",
"paramValue": "/AppName/**"
}]
}]
}
```
ip:9195/AppName/hnsp/uaccess/logintest
It doesn't work.
```json
{
"code": -107,
"message": "divide:Can not find selector, please check your configuration!",
"data": null
}
```
--
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@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-shenyu] ZhangJiaLei123 commented on issue #2951: [Question] Selector & rule
Posted by GitBox <gi...@apache.org>.
ZhangJiaLei123 commented on issue #2951:
URL: https://github.com/apache/incubator-shenyu/issues/2951#issuecomment-1054868511
That doesn't seem to work:
```json
{
"pluginName": "divide",
"selectorHandler": "[{\"upstreamUrl\":\"127.0.0.1:8507\"}]",
"conditionDataList": [{
"paramType": "uri",
"operator": "match",
"paramValue": "/AppName/**"
}],
"ruleDataList": [{
"ruleHandler": "{\"loadBalance\":\"random\"}",
"conditionDataList": [{
"paramType": "uri",
"operator": "match",
"paramValue": "/AppName/**"
}]
}]
}
```
--
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@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-shenyu] ZhangJiaLei123 commented on issue #2951: [Question] Selector & rule (contextPath)
Posted by GitBox <gi...@apache.org>.
ZhangJiaLei123 commented on issue #2951:
URL: https://github.com/apache/incubator-shenyu/issues/2951#issuecomment-1064965428
@yu199195
Sorry, I can't find detailed documentation and blogs about contextPath.
Can you help me? please
[issues](https://github.com/apache/incubator-shenyu/issues/2951#issuecomment-1060331029)
--
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@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-shenyu] ZhangJiaLei123 edited a comment on issue #2951: [Question] Selector & rule (contextPath)
Posted by GitBox <gi...@apache.org>.
ZhangJiaLei123 edited a comment on issue #2951:
URL: https://github.com/apache/incubator-shenyu/issues/2951#issuecomment-1060331029
Does contextPath have the same curl registration as Divide?
```json
{
"pluginName": "contextPath",
"selectorHandler": "[{\"upstreamUrl\":\"127.0.0.1:8507\"}]",
"conditionDataList": [{
"paramType": "uri",
"operator": "match",
"paramValue": "/app1/**"
}],
"ruleDataList": [{
"ruleHandler": "{\"loadBalance\":\"random\"}",
"conditionDataList": [{
"paramType": "uri",
"operator": "match",
"paramValue": "/app1/**"
}]
}]
}
```
ip:9195/app1/hnsp/uaccess/logintest
It doesn't work.
```json
{
"code": -107,
"message": "divide:Can not find selector, please check your configuration!",
"data": null
}
```

--
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@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-shenyu] yu199195 commented on issue #2951: [Question] Selector & rule
Posted by GitBox <gi...@apache.org>.
yu199195 commented on issue #2951:
URL: https://github.com/apache/incubator-shenyu/issues/2951#issuecomment-1054945700
can used context path plugin~
--
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@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org