circe-cors
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

circe-cors 处理跨域请求

安装

NPM

使用

import * as Koa from 'koa'
import cors from 'circe-cors'
 
const app = new Koa()
 
app.use(cors())

参数

  • origin?: string
  • allowMethods?: string | string[]
  • allowHeaders?: string | string[]
  • exposeHeaders?: string | string[]
  • maxAge?: string
  • credentials?: boolean

/circe-cors/

    Package Sidebar

    Install

    npm i circe-cors

    Weekly Downloads

    0

    Version

    0.0.3

    License

    MIT

    Last publish

    Collaborators

    • sikichan2
    • varharrie