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/08/06 07:40:19 UTC

[GitHub] [apisix] backnero commented on issue #2006: bug(cors): attempt to concatenate field 'conf_id' (a nil value)

backnero commented on issue #2006:
URL: https://github.com/apache/apisix/issues/2006#issuecomment-669764548


   Thanks @membphis for your help and dedication!
   I used apisix-docker's dockerfile (centos) as a blueprint to build a version 1.5 docker image.
   
   I configured the following in the global routing rules:
   PUT text.com/apisix/admin/global_rules/1
   ```
   {
           "plugins": {
               "limit-count": {
                   "time_window": 60,
                   "policy": "local",
                   "count": 100,
                   "key": "http_x_real_ip",
                   "rejected_code": 503
               },
               "cors":{}
           }
   }
   ```
   Access to all routes has the following error in error.log
   ```
   2020/08/06 15:15:13 [error] 49#49: *56762 failed to run header_filter_by_lua*: /usr/local/apisix/apisix/core/lrucache.lua:198: attempt to concatenate field 'conf_id' (a nil value)
   stack traceback:
           /usr/local/apisix/apisix/core/lrucache.lua:198: in function 'plugin_ctx'
           /usr/local/apisix/apisix/plugins/cors.lua:144: in function 'phase_fun'
           /usr/local/apisix/apisix/init.lua:142: in function 'run_plugin'
           /usr/local/apisix/apisix/init.lua:550: in function 'common_phase'
           /usr/local/apisix/apisix/init.lua:561: in function 'http_header_filter_phase'
   ```
   After @membphis instructed, I closed the global cors configuration. The interface is currently accessible, and other errors are found.
   
   
   **Currently, I need the function of the cors plug-in while I am using it. How can I solve this problem?**


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