I want to let [POST] localhost/product just this API to cross-domain.
I don't know how to do it
fastify.register(require('fastify-cors'), {
origin:'*',
methods:['POST'],
})
this is my API:
{
method: 'POST',
url: '/product',
handler: productsController.addProduct,
},