Re: [I] help request: Register custom variable via external Java plugin [apisix]

2025-07-08 Thread via GitHub


MariaLapovska closed issue #12399: help request: Register custom variable via 
external Java plugin
URL: https://github.com/apache/apisix/issues/12399


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [I] help request: Register custom variable via external Java plugin [apisix]

2025-07-08 Thread via GitHub


Baoyuantop commented on issue #12399:
URL: https://github.com/apache/apisix/issues/12399#issuecomment-3047834915

   Currently, externally set variables are not supported. You can try passing 
data through the request header and then configure `$http_ client_id ` in 
log_format.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [I] help request: Register custom variable via external Java plugin [apisix]

2025-07-03 Thread via GitHub


MariaLapovska commented on issue #12399:
URL: https://github.com/apache/apisix/issues/12399#issuecomment-3034284813

   @Baoyuantop unfortunately this didn't work. 
   I'm calling my Java filter as `ext-plugin-pre-req`, calling 
`request.setVars(Map.of("client_id", "123"))` in filter() method, and then have 
the following http logger log format config:
   
   ```
   log_format: {
   "client_id": "$client_id",
   "@timestamp": "$time_iso8601",
   "route_name": "$route_name"
   }
   ```
   
   Is it a wrong method to call in Java filter?


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



Re: [I] help request: Register custom variable via external Java plugin [apisix]

2025-07-03 Thread via GitHub


Baoyuantop commented on issue #12399:
URL: https://github.com/apache/apisix/issues/12399#issuecomment-3034238671

   In plugin configurations that support variables, you can access the variable 
using `$example_var_name` and in code using `ctx.var.example_var_name`.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]