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 2020/11/24 07:10:51 UTC

[GitHub] [apisix-dashboard] idbeta opened a new issue #863: bug: 2.1 version create route with cors will cause an error

idbeta opened a new issue #863:
URL: https://github.com/apache/apisix-dashboard/issues/863


   # Bug report
   
   ## Describe the bug
   2.1 version create route with `cors` plugin and `cors` used the default setting `{}`, as below:
   ```
   {"name":"test","uris":["/name"],"methods":["GET","HEAD","POST","PUT","DELETE","OPTIONS","PATCH"],"plugins":{"cors":{}},"vars":[],"upstream":{"type":"roundrobin","timeout":{"connect":6000,"send":6000,"read":6000},"nodes":[{"host":"127.0.0.1","port":7000,"weight":1}]}}
   ```
   when request the route, will cause an error:
   ```
   *104794 failed to run header_filter_by_lua*: /Users/idbeta/1106/apisix/apisix/plugins/cors.lua:89: bad argument #1 to 'str_find' (string expected, got nil)
   stack traceback:
   	[C]: in function 'str_find'
   	/Users/idbeta/1106/apisix/apisix/plugins/cors.lua:89: in function 'create_obj_fun'
   	/Users/idbeta/1106/apisix/apisix/core/lrucache.lua:92: in function 'plugin_ctx'
   	/Users/idbeta/1106/apisix/apisix/plugins/cors.lua:168: in function 'phase_func'
   	/Users/idbeta/1106/apisix/apisix/init.lua:159: in function 'run_plugin'
   	/Users/idbeta/1106/apisix/apisix/init.lua:622: in function 'common_phase'
   	/Users/idbeta/1106/apisix/apisix/init.lua:632: in function 'http_header_filter_phase'
   	header_filter_by_lua:2: in main chunk while reading response header from upstream, client: 127.0.0.1, server: , request: "GET /name HTTP/1.1", upstream: "http://127.0.0.1:7000/name", 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] nic-chen closed issue #863: bug: 2.1 version create route with cors will cause an error

Posted by GitBox <gi...@apache.org>.
nic-chen closed issue #863:
URL: https://github.com/apache/apisix-dashboard/issues/863


   


----------------------------------------------------------------
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



[GitHub] [apisix-dashboard] moonming commented on issue #863: bug: 2.1 version create route with cors will cause an error

Posted by GitBox <gi...@apache.org>.
moonming commented on issue #863:
URL: https://github.com/apache/apisix-dashboard/issues/863#issuecomment-736604202


   why test case PR will fix bug?


----------------------------------------------------------------
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



[GitHub] [apisix-dashboard] moonming commented on issue #863: bug: 2.1 version create route with cors will cause an error

Posted by GitBox <gi...@apache.org>.
moonming commented on issue #863:
URL: https://github.com/apache/apisix-dashboard/issues/863#issuecomment-736631024


   Please add the fix PR of 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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-dashboard] membphis commented on issue #863: bug: 2.1 version create route with cors will cause an error

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #863:
URL: https://github.com/apache/apisix-dashboard/issues/863#issuecomment-736625530


   we can close this issue. @nic-chen please confirm again
   
   ![image](https://user-images.githubusercontent.com/6814606/100760476-c1d37c00-342c-11eb-8345-74c9850d8ca2.png)
   


----------------------------------------------------------------
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



[GitHub] [apisix-dashboard] nic-chen closed issue #863: bug: 2.1 version create route with cors will cause an error

Posted by GitBox <gi...@apache.org>.
nic-chen closed issue #863:
URL: https://github.com/apache/apisix-dashboard/issues/863


   


----------------------------------------------------------------
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



[GitHub] [apisix-dashboard] nic-chen commented on issue #863: bug: 2.1 version create route with cors will cause an error

Posted by GitBox <gi...@apache.org>.
nic-chen commented on issue #863:
URL: https://github.com/apache/apisix-dashboard/issues/863#issuecomment-736901081






----------------------------------------------------------------
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