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


   ### Issue description
   
   1、add new route;
   2、enable health check and add a header parameter;
   3、modify route and remove the header parameter;
   4、when i submit , there is an error message displayed in the browser
   
   ### Expected behavior
   
   add route success
   
   ### How to Reproduce
   
   1、add new route;
   2、enable health check;
   3、add a header parameter ;
   4、submit;
   5、modify this route;
   6、remove the header parameter;
   7、submit;
   
   ### Screenshots
   
   
![image](https://user-images.githubusercontent.com/25243232/157217727-eaf4d8be-96ec-4911-81c5-ad01c4ad8ec3.png)
   
![image](https://user-images.githubusercontent.com/25243232/157217887-4c652cb7-d398-4527-8895-5d5b92a4c5ea.png)
   
![image](https://user-images.githubusercontent.com/25243232/157218022-ee426f3c-763e-40cc-906a-8b46facfa336.png)
   
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):2.11.0
   - OS (cmd: `uname -a`):linux
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty 
-V`):openresty/1.19.9.1
   - etcd version, if have (cmd: run `etcd --version`):etcd Version: 3.4.13
   - apisix-dashboard version, if have:2.11.0
   - Browser version, if have: chrome(97.0.4692.71)
   
   
   ### Additional context
   
   I checked the apisix code. req_headers is an array, if req_headers not nil 
,then there is at least one value in req_headers.
   So I think apisix-dashboard pass apisix an empty array,like this: 
req_headers[]。
   Then apisix validate failed,error message is: Array must have at least 1 
items


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


Reply via email to