pawarJayesh8511 opened a new issue #4917:
URL: https://github.com/apache/apisix/issues/4917
### Issue description
I have configured the cors plugin as follows:
{
"createdIndex":1537,
"modifiedIndex":1558,
"value":{
"plugins":{
"cors":{
"max_age":5,
"allow_credential":false,
"allow_headers":"testvalue",
"allow_methods":"POST",
"allow_origins":"http:\/\/google.com",
"disable":false,
"expose_headers":"*"
}
},
"status":1,
"upstream_id":"369094337344046994",
"uris":[
"\/api\/corscheck"
],
"create_time":1630085895,
"methods":[
"GET",
"POST"
],
"update_time":1630086355,
"id":"370032060422686610",
"name":"corscheck"
},
"key":"\/apisix\/routes\/370032060422686610"
}
I am trying with following curl:
curl -X GET -i http://localhost:9080/api/corscheck
HTTP/1.1 200
Content-Type: text/plain;charset=UTF-8
Content-Length: 40
Connection: keep-alive
Date: Fri, 27 Aug 2021 17:52:27 GMT
Server: APISIX/2.8
This endpoint is for cors plugin testing
I have also configured the "cors" plugin in the apisix "config.yml" file
I am getting the output although, I have configured the origin should be
"google.com"
Please let us know why is it not working? Am I missing anything?
### Environment
- apisix version (cmd: `apisix version`): 2.8
- OS (cmd: `uname -a`): Linux my-machine 5.11.0-27-generic
#29~20.04.1-Ubuntu SMP Wed Aug 11 15:58:17 UTC 2021 x86_64 x86_64 x86_64
GNU/Linux
- OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): nginx
version: openresty/1.19.9.1
- etcd version, if have (cmd: run `curl
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
3.4.0
- apisix-dashboard version, if have: 2.7
- luarocks version, if the issue is about installation (cmd: `luarocks
--version`): 3.4.0
--
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]