You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/07/30 07:16:52 UTC
[GitHub] [apisix-java-plugin-runner] Rdebu opened a new issue #54: request help: 写的测试插件不起作用
Rdebu opened a new issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54
### Issue description
写的测试插件不起作用
### Environment
centos7 + apisix2.7 + apisix-java-plugin-runner version0.1
* your apisix-java-plugin-runner version 0.1
按照官网写了个Java插件测试
文件名是TestFilter.java,也根据步骤放到了 package-info.java 同级文件夹下

内容是:
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package org.apache.apisix.plugin.runner.filter;
import com.google.gson.Gson;
import org.apache.apisix.plugin.runner.HttpRequest;
import org.apache.apisix.plugin.runner.HttpResponse;
import org.springframework.stereotype.Component;
import reactor.core.publisher.Mono;
import java.util.HashMap;
import java.util.Map;
@component
public class TestFilter implements PluginFilter {
@Override
public String name() {
/* It is recommended to keep the name of the filter the same as the class name.
Configure the filter to be executed on apisix's routes in the following format
{
"uri": "/hello",
"plugins": {
"ext-plugin-pre-req": {
"conf": [{
"name": "TestFilter",
"value": "bar"
}]
}
},
"upstream": {
"nodes": {
"127.0.0.1:1980": 1
},
"type": "roundrobin"
}
}
The value of name in the configuration corresponds to the value of return here.
*/
return "TestFilter";
}
@Override
public Mono<Void> filter(HttpRequest request, HttpResponse response, PluginFilterChain chain) {
/*
* If the conf you configured is of type json, you can convert it to Map or json.
*/
String configStr = request.getConfig(this);
Gson gson = new Gson();
Map<String, Object> conf = new HashMap<>();
conf = gson.fromJson(configStr, conf.getClass());
/*
* You can use the parameters in the configuration.
*/
// note: the path to the rewrite must start with '/'
// request.setPath((String) conf.get("rewrite_path"));
// request.setHeader((String) conf.get("conf_header_name"), (String) conf.get("conf_header_value"));
request.setHeader("para_test", "ning_test");
/* note: The value of the parameter is currently a string type.
If you need the json type, you need the upstream service to parse the string value to json.
For example, if the arg is set as below
request.setArg("new arg", "{"key1":"value1","key2":2}");
The arg received by the upstream service will be as below
"new arg": "{\"key1\":\"value1\",\"key2\":2}"
*/
request.setArg("test_arg", "test_value");
response.setHeader("para_test", "test");
return chain.filter(request, response);
}
}
按照官网步骤打了jar包也运行了jar包,也配置了个路由

要是测试成功了 访问curl -i -X GET "http://127.0.0.1:9080/#/user/table" -i 应该会显示一个自定义的响应头para_test
但是最后没成功是为啥呢
--
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-java-plugin-runner] Rdebu commented on issue #54: request help: The test plugin written does not work
Posted by GitBox <gi...@apache.org>.
Rdebu commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890513332
> here: 
>
> And please use English in the public channel, thx
okok bar? your mean is one map of this "conf" array?

--
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-java-plugin-runner] tzssangglass commented on issue #54: request help: The test plugin written does not work
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890537932
> but it in json is array format
Give an example. I think it has something to do with lua's table, which can store hash and array.
--
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-java-plugin-runner] tzssangglass commented on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-889894205
I think the java code and the apisix configuration are fine, this should be apisix not being able to access the java runner, you need to look at the apisix logs.
pls take a look at: https://github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/how-it-works.md#run
check that the below configuration is correct
```
ext-plugin:
cmd: ['java', '-jar', '-Xmx4g', '-Xms4g', '/path/to/apisix-runner-bin/apisix-java-plugin-runner.jar']
```
--
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-java-plugin-runner] Rdebu commented on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
Rdebu commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890294034
> > ext-plugin:
> > path_for_test: /tmp/runner.sock
>
> `path_for_test` is used in debug mode, this configuration is not needed to run with jar.
大佬看看我最新的那个错误呗
--
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-java-plugin-runner] tzssangglass commented on issue #54: request help: The test plugin written does not work
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-891698917
> I have a need :I access 127.0.0.1:9080/* for all requests can forward to 127.0.0.1:9080/apisix/admin/routes
> but i failed
`/apisix/admin/*` is APISIX internal location, rewritten address cannot be jumped。
see: https://github.com/apache/apisix/blob/1b247c8e1ebd324efe66abbe33d5647a93f0426e/apisix/cli/ngx_tpl.lua#L507-L524
--
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-java-plugin-runner] Rdebu commented on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
Rdebu commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890501368
> > request.setArg("test_arg", "test_value");
> > response.setHeader("para_test", "test");
>
> `request.setArg("test_arg", "test_value");`表示重写当前请求,看看:[https](https://github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/development.md#rewrite-request) : [//github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/development.md#rewrite-request](https://github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/development.md#rewrite-request)
>
> `response.setHeader("para_test", "test");`表示停止当前请求,客户端会收到这里生成的相关参数。看看:[https](https://github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/development.md#stop-request) : [//github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/development.md#stop-request](https://github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/development.md#stop-request)
>
> **如果这两个都存在,那么请求将被停止。**
>
> 在`config.yaml`apisix的:
>
> ```
> ext-plugin:
> cmd: ['java', '-jar', '-Xmx4g', '-Xms4g', '/root/IdeaProjects/apisix-java-plugin-runner/runner-dist/apisix-runner-bin-dist/target/apisix-runner-bin/apisix-runner-bin/apisix-java-plugin-runner.jar']
> ```
>
> apisix 中成功 jar 启动输出的日志`error.log`:
>
> ```
> 2021/07/31 20:53:07 [warn] 107773#107773: *69 [lua] init.lua:620:
> . ____ _ __ _ _
> /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
> ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
> \\/ ___)| |_)| | | | | || (_| | ) ) ) )
> ' |____| .__|_| |_|_| |_\__, | / / / /
> , context: ngx.timer
> 2021/07/31 20:53:07 [warn] 107773#107773: *69 [lua] init.lua:620: =========|_|==============|___/=/_/_/_/
> , context: ngx.timer
> 2021/07/31 20:53:07 [warn] 107773#107773: *69 [lua] init.lua:620: :: Spring Boot :: (v2.4.5), context: ngx.timer
> 2021/07/31 20:53:07 [warn] 107773#107773: *69 [lua] init.lua:620:
> , context: ngx.timer
> 2021/07/31 20:53:07 [warn] 107773#107773: *69 [lua] init.lua:620:
> , context: ngx.timer
> 2021/07/31 20:53:07 [warn] 107773#107773: *69 [lua] init.lua:620: 2021-07-31 20:53:07.993 INFO 107784 --- [ main] o.a.a.p.r.PluginRunnerApplication : Starting PluginRunnerApplication v0.1.0 using Java 11.0.11 on localhost.localdomain with PID 107784 (/root/IdeaProjects/apisix-java-plugin-runner/runner-dist/apisix-runner-bin-dist/target/apisix-runner-bin/apisix-runner-bin/apisix-java-plugin-runner.jar started by root in /usr/local/apisix)
> , context: ngx.timer
> 2021/07/31 20:53:07 [warn] 107773#107773: *69 [lua] init.lua:620: 2021-07-31 20:53:07.996 INFO 107784 --- [ main] o.a.a.p.r.PluginRunnerApplication : No active profile set, falling back to default profiles: default
> , context: ngx.timer
> 2021/07/31 20:53:09 [warn] 107773#107773: *69 [lua] init.lua:620: 2021-07-31 20:53:09.618 INFO 107784 --- [ main] o.a.a.p.r.PluginRunnerApplication : Started PluginRunnerApplication in 2.004 seconds (JVM running for 2.605)
> , context: ngx.timer
> 2021/07/31 20:53:09 [warn] 107773#107773: *69 [lua] init.lua:620: 2021-07-31 20:53:09.793 WARN 107784 --- [ main] o.a.a.p.r.s.ApplicationRunner : java runner is listening on the socket file: /usr/local/apisix/conf/apisix-107767.sock
> , context: ngx.timer
> ```
>
> 使用与您相同的环境和代码,这是我的复制结果:
>
> ```
> $ curl -i 127.0.0.1:9080/get
> HTTP/1.1 500 Internal Server Error
> Date: Sat, 31 Jul 2021 12:40:19 GMT
> Content-Type: text/html; charset=utf-8
> Content-Length: 553
> Connection: close
> para-test: test
> ETag: "610544ac-229"
> Server: APISIX/2.7
> ```
>
> 在`para-test`头已成功返回给客户端。
我懂了,之前理解错了,以为response是返回给客户端的response,没想到是停止请求的,谢谢大佬。之后还有个问题
一下代码的request.getConfig 他这个config是哪里的配置啊
String configStr = request.getConfig(this);
Gson gson = new Gson();
Map<String, Object> conf = new HashMap<>();
conf = gson.fromJson(configStr, conf.getClass());
--
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-java-plugin-runner] Rdebu commented on issue #54: request help: The test plugin written does not work
Posted by GitBox <gi...@apache.org>.
Rdebu commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890528852
> Not exactly accurate, it depends on your configuration in APISIX.
>
> conf is a map example:
>
> https://github.com/apache/apisix-java-plugin-runner/blob/d6bc7fa86c62a9967b0bdf05bb00554249226c5c/runner-core/src/test/java/org/apache/apisix/plugin/runner/handler/A6HttpCallHandlerTest.java#L130
and you say conf is a map , but it in json is array format( i think it because there is "[")
--
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-java-plugin-runner] Rdebu commented on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
Rdebu commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890279101
> I think the java code and the apisix configuration are fine, this should be apisix not being able to access the java runner, you need to look at the apisix logs.
>
> pls take a look at: https://github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/how-it-works.md#run
>
> check that the below configuration is correct
>
> ```
> ext-plugin:
> cmd: ['java', '-jar', '-Xmx4g', '-Xms4g', '/path/to/apisix-runner-bin/apisix-java-plugin-runner.jar']
> ```
日志文件打印以下:
2021/07/31 10:28:42 [crit] 28450#28450: *10171284 connect() to unix:/tmp/runner. sock failed (13: Permission denied), client: 127.0.0.1, server: _, request: "GET /get HTTP/1.1", host: "127.0.0.1:9080"
2021/07/31 10:28:42 [error] 28450#28450: *10171284 [lua] init. lua:553: phase_func(): failed to connect to the unix socket unix:/tmp/runner. sock: permission denied, client: 127.0.0.1, server: _, request: "GET /get HTTP/1.1", host: "127.0.0.1:9080"
2021/07/31 10:28:42 [warn] 28450#28450: *10171284 [lua] plugin. lua:646: run_plugin(): ext-plugin-pre-req exits with http status code 503, client: 127.0.0.1, server: _, request: "GET /get
--
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-java-plugin-runner] tzssangglass commented on issue #54: request help: The test plugin written does not work
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-891694481
> But the ARG of a POST request is not in the body of the request,where are the args appended or be modified ?
pls submit an issue at APISIX.
--
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-java-plugin-runner] Rdebu commented on issue #54: request help: The test plugin written does not work
Posted by GitBox <gi...@apache.org>.
Rdebu commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-891492691
> > Is that a splice after apisix's IP + port ?If yes, if I want to jump to another IP port,what can I do?
>
> This cannot be done in java runner. I think you should configure upstream in apisix to do this.
>
> > there is a "request.setArg()" Is the ARG of a POST request in the body of the request
>
> no
>
> > Is the ARG of a GET request in the URI
>
> yes, see: https://github.com/openresty/lua-nginx-module#ngxreqset_uri_args
I forgot about upstream hahahhah .
I understand the ARG of a GET request in the URI . thx.
But the ARG of a POST request is not in the body of the request,where are the args appended or be modified ?
--
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-java-plugin-runner] tzssangglass commented on issue #54: request help: The test plugin written does not work
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890515234
Not exactly accurate, it depends on your configuration in APISIX.
conf is a map example: https://github.com/apache/apisix-java-plugin-runner/blob/d6bc7fa86c62a9967b0bdf05bb00554249226c5c/runner-core/src/test/java/org/apache/apisix/plugin/runner/handler/A6HttpCallHandlerTest.java#L130
--
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-java-plugin-runner] tzssangglass commented on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890295257
How did you configure the below configuration in apisix
```yaml
ext-plugin:
cmd:
```
--
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-java-plugin-runner] Rdebu commented on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
Rdebu commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-889806445
> can you use "httpbin.org:80" as upstream, and test "http://127.0.0.1:9080/get", then show the response.
显示503

那应该是我插件配置有问题吗?
上游:

路由:

Java测试插件:
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.apisix.plugin.runner.filter;
import com.google.gson.Gson;
import org.apache.apisix.plugin.runner.HttpRequest;
import org.apache.apisix.plugin.runner.HttpResponse;
import org.springframework.stereotype.Component;
import reactor.core.publisher.Mono;
import java.util.HashMap;
import java.util.Map;
@Component
public class TestFilter implements PluginFilter {
@Override
public String name() {
/* It is recommended to keep the name of the filter the same as the class name.
Configure the filter to be executed on apisix's routes in the following format
{
"uri": "/hello",
"plugins": {
"ext-plugin-pre-req": {
"conf": [{
"name": "TestFilter",
"value": "bar"
}]
}
},
"upstream": {
"nodes": {
"127.0.0.1:1980": 1
},
"type": "roundrobin"
}
}
The value of name in the configuration corresponds to the value of return here.
*/
return "TestFilter";
}
@Override
public Mono<Void> filter(HttpRequest request, HttpResponse response, PluginFilterChain chain) {
/*
* If the conf you configured is of type json, you can convert it to Map or json.
*/
String configStr = request.getConfig(this);
Gson gson = new Gson();
Map<String, Object> conf = new HashMap<>();
conf = gson.fromJson(configStr, conf.getClass());
/*
* You can use the parameters in the configuration.
*/
// note: the path to the rewrite must start with '/'
// request.setPath((String) conf.get("rewrite_path"));
// request.setHeader((String) conf.get("conf_header_name"), (String) conf.get("conf_header_value"));
request.setHeader("para_test", "ning_test");
/* note: The value of the parameter is currently a string type.
If you need the json type, you need the upstream service to parse the string value to json.
For example, if the arg is set as below
request.setArg("new arg", "{\"key1\":\"value1\",\"key2\":2}");
The arg received by the upstream service will be as below
"new arg": "{\"key1\":\"value1\",\"key2\":2}"
*/
request.setArg("test_arg", "test_value");
response.setHeader("para_test", "test");
return chain.filter(request, response);
}
}
Java插件位置

最后也在centos中打了jar包运行了 只有可能上面某一步错了吧 大佬看看
--
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-java-plugin-runner] tzssangglass commented on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890343673
> request.setArg("test_arg", "test_value");
>
> response.setHeader("para_test", "test");
`request.setArg("test_arg", "test_value");` means that rewrite the current request, take a look at: https://github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/development.md#rewrite-request
`response.setHeader("para_test", "test");` means that stop the current request, the client will receive the relevant parameters generated here. take a look at: https://github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/development.md#stop-request
**If both of these exist, then the request will be stopped.**
Using the same environment and code as yours, here are my reproduction results:
```
$ curl -i 127.0.0.1:9080/get
HTTP/1.1 500 Internal Server Error
Date: Sat, 31 Jul 2021 12:40:19 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 553
Connection: close
para-test: test
ETag: "610544ac-229"
Server: APISIX/2.7
```
the `para-test` header has been successfully returned to the client.
--
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-java-plugin-runner] Rdebu commented on issue #54: request help: The test plugin written does not work
Posted by GitBox <gi...@apache.org>.
Rdebu commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-891442090
> > but it in json is array format
>
> Give an example. I think it has something to do with lua's table, which can store hash and array.
The setPath must start with a "/". Is that a splice after apisix's IP + port ?If yes, if I want to jump to another IP port,what can I do?

there is a "request.setArg()" Is the ARG of a POST request in the body of the request? Is the ARG of a GET request in the 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-java-plugin-runner] tzssangglass commented on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890294106
> 按照官网步骤打了jar包也运行了jar包
> 最后也在centos中打了jar包运行了
You said to run it as a jar, so `'/path/to/apisix-runner-bin/apisix-java-plugin-runner.jar` should be the absolute path to the jar.
--
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-java-plugin-runner] tzssangglass commented on issue #54: request help: The test plugin written does not work
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-891471569
> Is that a splice after apisix's IP + port ?If yes, if I want to jump to another IP port,what can I do?
This cannot be done in java runner. I think you should configure upstream in apisix to do this.
> there is a "request.setArg()" Is the ARG of a POST request in the body of the request
no
> Is the ARG of a GET request in the URI
yes, see: https://github.com/openresty/lua-nginx-module#ngxreqset_uri_args
--
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-java-plugin-runner] tzssangglass commented on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890502047
here: 
And please use English in the public channel, thx
--
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-java-plugin-runner] Rdebu commented on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
Rdebu commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890295458
> How did you configure the below configuration in apisix
>
> ```yaml
> ext-plugin:
> cmd:
> ```
现在是以debug模式运行

--
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-java-plugin-runner] Rdebu commented on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
Rdebu commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890278385
> I think the java code and the apisix configuration are fine, this should be apisix not being able to access the java runner, you need to look at the apisix logs.
>
> pls take a look at: https://github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/how-it-works.md#run
>
> check that the below configuration is correct
>
> ```
> ext-plugin:
> cmd: ['java', '-jar', '-Xmx4g', '-Xms4g', '/path/to/apisix-runner-bin/apisix-java-plugin-runner.jar']
> ```
改成了
ext-plugin:
cmd: ['java', '-jar', '-Xmx4g', '-Xms4g', '/path/to/apisix-runner-bin/apisix-java-plugin-runner.jar']
还是一样的503

--
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-java-plugin-runner] tzssangglass commented on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-889769876
can you use "httpbin.org:80" as upstream, and test "http://127.0.0.1:9080/get", then show the response.
--
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-java-plugin-runner] Rdebu commented on issue #54: request help: The test plugin written does not work
Posted by GitBox <gi...@apache.org>.
Rdebu commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890548920
> > but it in json is array format
>
> Give an example. I think it has something to do with lua's table, which can store hash and array.
how to put data in the conf?
in A6HttpCallHandlerTest.java the "bar" be assigned a value , so the "value" be assigned a value in the json can be requested
(Do I understand it correctly? )


the RewriteRequestDemoFilter.java in module "sample" , there are some properties , for example , the "rewrite_path"

I should set it in config like thie?Do I understand it correctly?

--
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-java-plugin-runner] Rdebu commented on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
Rdebu commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890315926
> How did you configure the below configuration in apisix
>
> ```yaml
> ext-plugin:
> cmd:
> ```
现在debug环境和run环境啥时候配jar包的环境变量的问题我理解的,主要就是配置完自定义插件访问结果503,查看apisix的error日志发现以下报错

--
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-java-plugin-runner] tzssangglass edited a comment on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
tzssangglass edited a comment on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890343673
> request.setArg("test_arg", "test_value");
>
> response.setHeader("para_test", "test");
`request.setArg("test_arg", "test_value");` means that rewrite the current request, take a look at: https://github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/development.md#rewrite-request
`response.setHeader("para_test", "test");` means that stop the current request, the client will receive the relevant parameters generated here. take a look at: https://github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/development.md#stop-request
**If both of these exist, then the request will be stopped.**
the `config.yaml` of apisix:
```
ext-plugin:
cmd: ['java', '-jar', '-Xmx4g', '-Xms4g', '/root/IdeaProjects/apisix-java-plugin-runner/runner-dist/apisix-runner-bin-dist/target/apisix-runner-bin/apisix-runner-bin/apisix-java-plugin-runner.jar']
```
log of successful jar startup output in apisix's `error.log`:
```
2021/07/31 20:53:07 [warn] 107773#107773: *69 [lua] init.lua:620:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
, context: ngx.timer
2021/07/31 20:53:07 [warn] 107773#107773: *69 [lua] init.lua:620: =========|_|==============|___/=/_/_/_/
, context: ngx.timer
2021/07/31 20:53:07 [warn] 107773#107773: *69 [lua] init.lua:620: :: Spring Boot :: (v2.4.5), context: ngx.timer
2021/07/31 20:53:07 [warn] 107773#107773: *69 [lua] init.lua:620:
, context: ngx.timer
2021/07/31 20:53:07 [warn] 107773#107773: *69 [lua] init.lua:620:
, context: ngx.timer
2021/07/31 20:53:07 [warn] 107773#107773: *69 [lua] init.lua:620: 2021-07-31 20:53:07.993 INFO 107784 --- [ main] o.a.a.p.r.PluginRunnerApplication : Starting PluginRunnerApplication v0.1.0 using Java 11.0.11 on localhost.localdomain with PID 107784 (/root/IdeaProjects/apisix-java-plugin-runner/runner-dist/apisix-runner-bin-dist/target/apisix-runner-bin/apisix-runner-bin/apisix-java-plugin-runner.jar started by root in /usr/local/apisix)
, context: ngx.timer
2021/07/31 20:53:07 [warn] 107773#107773: *69 [lua] init.lua:620: 2021-07-31 20:53:07.996 INFO 107784 --- [ main] o.a.a.p.r.PluginRunnerApplication : No active profile set, falling back to default profiles: default
, context: ngx.timer
2021/07/31 20:53:09 [warn] 107773#107773: *69 [lua] init.lua:620: 2021-07-31 20:53:09.618 INFO 107784 --- [ main] o.a.a.p.r.PluginRunnerApplication : Started PluginRunnerApplication in 2.004 seconds (JVM running for 2.605)
, context: ngx.timer
2021/07/31 20:53:09 [warn] 107773#107773: *69 [lua] init.lua:620: 2021-07-31 20:53:09.793 WARN 107784 --- [ main] o.a.a.p.r.s.ApplicationRunner : java runner is listening on the socket file: /usr/local/apisix/conf/apisix-107767.sock
, context: ngx.timer
```
Using the same environment and code as yours, here are my reproduction results:
```
$ curl -i 127.0.0.1:9080/get
HTTP/1.1 500 Internal Server Error
Date: Sat, 31 Jul 2021 12:40:19 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 553
Connection: close
para-test: test
ETag: "610544ac-229"
Server: APISIX/2.7
```
the `para-test` header has been successfully returned to the client.
--
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-java-plugin-runner] Rdebu removed a comment on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
Rdebu removed a comment on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890295458
> How did you configure the below configuration in apisix
>
> ```yaml
> ext-plugin:
> cmd:
> ```
现在是以debug模式运行

--
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-java-plugin-runner] Rdebu commented on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
Rdebu commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890294746
> > 按照官网步骤打了jar包也运行了jar包
>
> > 最后也在centos中打了jar包运行了
>
> You said to run it as a jar, so `'/path/to/apisix-runner-bin/apisix-java-plugin-runner.jar` should be the absolute path to the jar.
jar包是能正常运行的
--
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-java-plugin-runner] Rdebu commented on issue #54: request help: The test plugin written does not work
Posted by GitBox <gi...@apache.org>.
Rdebu commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-891700048
> > But the ARG of a POST request is not in the body of the request,where are the args appended or be modified ?
>
> pls submit an issue at APISIX.
ok ,this question: " the ARG of a POST request is not in the body of the request,where are the args appended or be modified ?"
Please help me solve it
--
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-java-plugin-runner] Rdebu commented on issue #54: request help: The test plugin written does not work
Posted by GitBox <gi...@apache.org>.
Rdebu commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890528532
> Not exactly accurate, it depends on your configuration in APISIX.
>
> conf is a map example:
>
> https://github.com/apache/apisix-java-plugin-runner/blob/d6bc7fa86c62a9967b0bdf05bb00554249226c5c/runner-core/src/test/java/org/apache/apisix/plugin/runner/handler/A6HttpCallHandlerTest.java#L130
so the "value" property ’s value is the key "bar" 's value in the map ?Why this design?
--
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-java-plugin-runner] tzssangglass commented on issue #54: request help: The test plugin written does not work
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-894763940
This is not yet supported in the plugin runner. We are discussing this, see: https://lists.apache.org/thread.html/r03232d5a48ba1d71c1b62185894265348abbf3bede13fba7edd38255%40%3Cdev.apisix.apache.org%3E
--
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-java-plugin-runner] Rdebu commented on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
Rdebu commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890295531
> How did you configure the below configuration in apisix
>
> ```yaml
> ext-plugin:
> cmd:
> ```
最后一个参数是我jar包的全路径

--
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-java-plugin-runner] Rdebu commented on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
Rdebu commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890283199
> I think the java code and the apisix configuration are fine, this should be apisix not being able to access the java runner, you need to look at the apisix logs.
>
> pls take a look at: https://github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/how-it-works.md#run
>
> check that the below configuration is correct
>
> ```
> ext-plugin:
> cmd: ['java', '-jar', '-Xmx4g', '-Xms4g', '/path/to/apisix-runner-bin/apisix-java-plugin-runner.jar']
> ```
找到原因了,按照官网说的打开sock权限 但是继续报以下错误:
2021/07/31 11:15:29 [error] 28453#28453: *10356096 [lua] init.lua:553: phase_func(): failed to receive RPC_HTTP_REQ_CALL: closed, client: 127.0.0.1, server: _, request: "GET /get HTTP/1.1", host: "127.0.0.1:9080"
2021/07/31 11:15:29 [warn] 28453#28453: *10356096 [lua] plugin.lua:646: run_plugin(): ext-plugin-pre-req exits with http status code 503, client: 127.0.0.1, server: _, request: "GET /get HTTP/1.1", host: "127.0.0.1:9080"
--
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-java-plugin-runner] tzssangglass commented on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890293881
> ext-plugin:
> path_for_test: /tmp/runner.sock
`path_for_test` is used in debug mode, this configuration is not needed to run with jar.
--
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-java-plugin-runner] tzssangglass closed issue #54: request help: The test plugin written does not work
Posted by GitBox <gi...@apache.org>.
tzssangglass closed issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54
--
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-java-plugin-runner] Rdebu commented on issue #54: request help: 写的测试插件不起作用
Posted by GitBox <gi...@apache.org>.
Rdebu commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-890273089
> I think the java code and the apisix configuration are fine, this should be apisix not being able to access the java runner, you need to look at the apisix logs.
>
> pls take a look at: https://github.com/apache/apisix-java-plugin-runner/blob/main/docs/en/latest/how-it-works.md#run
>
> check that the below configuration is correct
>
> ```
> ext-plugin:
> cmd: ['java', '-jar', '-Xmx4g', '-Xms4g', '/path/to/apisix-runner-bin/apisix-java-plugin-runner.jar']
> ```
我是用debug那一栏的 也就是
ext-plugin:
path_for_test: /tmp/runner.sock
是不是这个原因呢
--
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-java-plugin-runner] Rdebu commented on issue #54: request help: The test plugin written does not work
Posted by GitBox <gi...@apache.org>.
Rdebu commented on issue #54:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/54#issuecomment-891615001
> > Is that a splice after apisix's IP + port ?If yes, if I want to jump to another IP port,what can I do?
>
> This cannot be done in java runner. I think you should configure upstream in apisix to do this.
>
> > there is a "request.setArg()" Is the ARG of a POST request in the body of the request
>
> no
>
> > Is the ARG of a GET request in the URI
>
> yes, see: https://github.com/openresty/lua-nginx-module#ngxreqset_uri_args
The second question is:
the path to the rewrite must start with '/'
I have a need :I access 127.0.0.1:9080/* for all requests can forward to 127.0.0.1:9080/apisix/admin/routes
but i failed

What's my problem?
my route is :
{
"uris": [
"/*"
],
"name": "TestFilter_route",
"desc": "TestFilter_route",
"methods": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"HEAD",
"OPTIONS",
"CONNECT",
"TRACE"
],
"hosts": [
"127.0.0.1"
],
"remote_addrs": [
"127.0.0.1"
],
"plugins": {
"ext-plugin-pre-req": {
"conf": [
{
"name": "TestFilter",
"value": "{\"rewrite_path\":\"/apisix/admin/routes\",\"conf_header_name\":\"X-API-KEY\",\"conf_header_value\":\"edd1c9f034335f136f87ad84b625c8f1\"}"
}
]
}
},
"upstream_id": "366061654728770074",
"labels": {
"API_VERSION": "V1"
},
"status": 1
}
my TestFilter.java is
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.apisix.plugin.runner.filter;
import com.google.gson.Gson;
import lombok.extern.slf4j.Slf4j;
import org.apache.apisix.plugin.runner.HttpRequest;
import org.apache.apisix.plugin.runner.HttpResponse;
import org.springframework.stereotype.Component;
import reactor.core.publisher.Mono;
import java.util.HashMap;
import java.util.Map;
@Component
@Slf4j
public class TestFilter implements PluginFilter {
@Override
public String name() {
/* It is recommended to keep the name of the filter the same as the class name.
Configure the filter to be executed on apisix's routes in the following format
{
"uri": "/hello",
"plugins": {
"ext-plugin-pre-req": {
"conf": [{
"name": "TestFilter",
"value": "bar"
}]
}
},
"upstream": {
"nodes": {
"127.0.0.1:1980": 1
},
"type": "roundrobin"
}
}
The value of name in the configuration corresponds to the value of return here.
*/
return "TestFilter";
}
@Override
public Mono<Void> filter(HttpRequest request, HttpResponse response, PluginFilterChain chain) {
/*
* If the conf you configured is of type json, you can convert it to Map or json.
*/
String configStr = request.getConfig(this);
Gson gson = new Gson();
Map<String, Object> conf = new HashMap<>();
conf = gson.fromJson(configStr, conf.getClass());
log.info("request: {}", request);
log.info("response: {}", response);
/*
* You can use the parameters in the configuration.
*/
// note: the path to the rewrite must start with '/'
// request.setPath((String) conf.get("rewrite_path"));
// request.setHeader((String) conf.get("conf_header_name"), (String) conf.get("conf_header_value"));
// request.setHeader("para_test", "ning_test");
request.setPath((String) conf.get("rewrite_path"));
request.setHeader((String) conf.get("conf_header_name"), (String) conf.get("conf_header_value"));
return chain.filter(request, response);
}
}
--
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