monkeyDluffy6017 commented on code in PR #9720:
URL: https://github.com/apache/apisix/pull/9720#discussion_r1258592655
##########
t/plugin/mocking.t:
##########
@@ -424,3 +424,44 @@ passed
GET /hello
--- response_body chomp
empty_var:
+
+
+
+=== TEST 19: set route(return headers)
+--- config
+ location /t {
+ content_by_lua_block {
+ local t = require("lib.test_admin").test
+ local code, body = t('/apisix/admin/routes/1',
+ ngx.HTTP_PUT,
+ [[{
+ "plugins": {
+ "mocking": {
+ "response_example": "hello world",
+ "response_headers": {
+ "X-Apisix": "is-cool",
+ "X-Really":"yes"
Review Comment:
I said this because you use the function `core.response.add_header` to add
the response header, the function will append the value to the same header, but
i tested locally, and found that the `conf.response_headers` won't pass the
duplicated headers.
If we pass
```
"response_headers": {
"X-Apisix": "is-cool",
"X-Apisix": "yes"
}
```
we will get
```
"response_headers": {
"X-Apisix": "yes"
}
```
So it's ok for this.
But i don't see you example
--
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]