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 2019/11/12 01:14:27 UTC
[GitHub] [incubator-apisix] lilien1010 opened a new pull request #840:
feature: allow set up header to client in proxy-rewrite, CROS allowed
lilien1010 opened a new pull request #840: feature: allow set up header to client in proxy-rewrite,CROS allowed
URL: https://github.com/apache/incubator-apisix/pull/840
### Summary
allow user to set customer field & value is very helpful,
scenario: we set a API very open, and is can be visit form other domain
we can use proxy-write plugin this way,
```
{
"plugins": {
"proxy-rewrite": {
"resp_headers": {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, OPTIONS"
}
}
},
"upstream": {
"nodes": {
"127.0.0.1:1980": 1
},
"type": "roundrobin"
},
"uri": "/hello"
}
```
### Full changelog
* doc/plugins/proxy-rewrite-cn.md
* doc/plugins/proxy-rewrite.md
* lua/apisix/plugins/proxy-rewrite.lua
* lua/apisix/plugins/proxy-rewrite.lua
### Issues resolved
Fix https://github.com/apache/incubator-apisix/issues/839
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services