提交 8227baf4 编写于 作者: M Miguel Ángel Durán 提交者: Joe Haddad

docs(api-routes): fix micro-cors example (#9184)

The correct option to use with `micro-cors` package is `allowMethods` instead `allowedMethods`. This PR fixes the example.
上级 e42fdd82
......@@ -1240,7 +1240,7 @@ Then, import `micro-cors` and [configure it](https://github.com/possibilities/mi
import Cors from 'micro-cors'
const cors = Cors({
allowedMethods: ['GET', 'HEAD'],
allowMethods: ['GET', 'HEAD'],
})
function Endpoint(req, res) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册