0.0.3 • Published 7 years ago

circe-cors v0.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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