piglei opened a new issue, #9481:
URL: https://github.com/apache/apisix/issues/9481

   ### Description
   
   When a user calls the "/apisix/admin/plugins/reload" endpoint to reload the 
plugins, there is a chance that a wrong HTTP method was used instead of "PUT". 
In the current implementation, when this happens, for example the endpoint was 
called via GET method, APISIX will try to find any plugins called "reload", 
which produces the following response:
   
   ```json
   {
        "error_msg": "failed to load plugin reload"
   }
   ```
   
   To improve the experience, we can consider returning a more user-friendly 
response when the "plugins/reload" is requested using a wrong method. For 
example, return this instead:
   
   ```json
   {
        "error_msg": "please use PUT method to reload the plugins, GET method 
is not allowed."
   }
   ```
   
   > NOTE: This change also makes "reload" a reserved plugin name (wondering if 
this concept exists in APISIX), because it can never be retrieved via "GET 
/plugins/<name>".


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