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

1.0.4 • Public • Published

Hyper-Express CORS Middleware

Usage

import useCORS from 'hyper-express-cors'

const domain = 'http://localhost:8080'


webserver.use(
	useCORS({ origin: domain, credentials: true })
)

webserver.options('/*', useCORS({
	origin: domain,
	credentials: true,
	optionsRoute: true
}))

webserver.listen(3000)

Readme

Keywords

none

Package Sidebar

Install

npm i hyper-express-cors

Weekly Downloads

3

Version

1.0.4

License

MIT

Unpacked Size

4.04 kB

Total Files

11

Last publish

Collaborators

  • neo77