[GitHub] [apisix] tzssangglass commented on issue #8117: router can't support location @xxx ?

2022-10-25 Thread GitBox


tzssangglass commented on issue #8117:
URL: https://github.com/apache/apisix/issues/8117#issuecomment-1290228245

   Considered as solved, feel free to reopen this if you needed.


-- 
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-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [apisix] tzssangglass commented on issue #8117: router can't support location @xxx ?

2022-10-20 Thread GitBox


tzssangglass commented on issue #8117:
URL: https://github.com/apache/apisix/issues/8117#issuecomment-1285525033

   > How to get the node information of an existing upstream to add to 
up_conf?For example, get the nodes information in my test upstream 
"upstream-test-a" and add it to the variable up_conf.
   
   `ctx.matched_upstream`, you can dump ctx by `ngx.log(ngx.WARN, "ctx : ", 
require("inspect")(ctx, {depth = 2}))`, and search info in ctx.


-- 
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-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [apisix] tzssangglass commented on issue #8117: router can't support location @xxx ?

2022-10-20 Thread GitBox


tzssangglass commented on issue #8117:
URL: https://github.com/apache/apisix/issues/8117#issuecomment-1284999187

   > I have created upstream "upstream-test1" and "upstream-test2" via the 
admin api. how do forward to it in the access phase?
   
   search:
   
   ```
upstream.set(ctx, up_conf.type .. "#route_" .. matched_route.value.id, 
 ctx.conf_version, up_conf) 
   ```


-- 
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-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [apisix] tzssangglass commented on issue #8117: router can't support location @xxx ?

2022-10-19 Thread GitBox


tzssangglass commented on issue #8117:
URL: https://github.com/apache/apisix/issues/8117#issuecomment-1284810920

   you can learn how to use redis in APISIX from: 
https://github.com/apache/apisix/blob/23356d6c4a58379f5cf33be92e0d88cc6399a853/apisix/plugins/limit-count/limit-count-redis.lua#L54-L109
   
   and how to set upstream from: 
https://github.com/apache/apisix/blob/23356d6c4a58379f5cf33be92e0d88cc6399a853/apisix/plugins/example-plugin.lua#L84-L108
   
   


-- 
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-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [apisix] tzssangglass commented on issue #8117: router can't support location @xxx ?

2022-10-19 Thread GitBox


tzssangglass commented on issue #8117:
URL: https://github.com/apache/apisix/issues/8117#issuecomment-1283901832

   > I can't think of anything else too good at the moment, It judge whether 
the user id is in redis and forward it to the corresponding route.
   
   forward it to the corresponding route is hard to do, but forwarding it to 
the corresponding upstream can be achieved


-- 
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-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [apisix] tzssangglass commented on issue #8117: router can't support location @xxx ?

2022-10-19 Thread GitBox


tzssangglass commented on issue #8117:
URL: https://github.com/apache/apisix/issues/8117#issuecomment-1283640966

   you can search `@grpc_pass` in source code to learn how to use `ngx.exec()` 
and `location` to do internal jumps, I think this is complex.
   
   I guess you can achieve your needs in a different way?


-- 
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-unsubscr...@apisix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org