You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "piglei (via GitHub)" <gi...@apache.org> on 2023/05/15 02:57:42 UTC

[GitHub] [apisix] piglei opened a new issue, #9481: feat: Inform user when call "/plugins/reload" using a wrong HTTP method

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: notifications-unsubscribe@apisix.apache.org.apache.org

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


[GitHub] [apisix] lingsamuel closed issue #9481: feat: Inform user when call "/plugins/reload" using a wrong HTTP method

Posted by "lingsamuel (via GitHub)" <gi...@apache.org>.
lingsamuel closed issue #9481: feat: Inform user when call "/plugins/reload" using a wrong HTTP method
URL: https://github.com/apache/apisix/issues/9481


-- 
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: notifications-unsubscribe@apisix.apache.org

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