fastify-cors:加速 CORS

时间:2021-07-23 19:23:56
【文件属性】:
文件名称:fastify-cors:加速 CORS
文件大小:16KB
文件格式:ZIP
更新时间:2021-07-23 19:23:56
cors fastify cors-headers JavaScript fastify-cors fastify-cors允许在 Fastify 应用程序中使用 。 支持 Fastify 3.x版本。 Fastify ^2.x兼容性请参考及相关版本。 Fastify ^1.x兼容性请参考及相关版本。 安装 npm i fastify-cors 用法 需要fastify-cors并将其注册为任何其他插件,它将添加一个preHandler钩子和一个 。 const fastify = require ( 'fastify' ) ( ) fastify . register ( require ( 'fastify-cors' ) , { // put your options here } ) fastify . get ( '/' , ( req , reply ) => { reply . send ( { hello : 'world'
【文件预览】:
fastify-cors-master
----vary.js(397B)
----.gitattributes(127B)
----.github()
--------stale.yml(772B)
--------dependabot.yml(261B)
--------workflows()
----.taprc(47B)
----bench.js(385B)
----LICENSE(1KB)
----test()
--------index.test-d.ts(7KB)
--------preflight.test.js(8KB)
--------vary.test.js(330B)
--------cors.test.js(18KB)
----README.md(6KB)
----index.d.ts(3KB)
----.editorconfig(131B)
----.gitignore(2KB)
----index.js(7KB)
----package.json(1KB)

网友评论