405 bad request on a POST request through strapi

I am getting a 405 bad request on a POST request.

You should configure the Access-Control-Allow-Methods CORS header.
You can configure it in config/middlewares.js

Here is a reference:

I am bit confused by your comment. Can you please tell in detail.
Thanks for your reply.