JSPM

hapi-cors-headers

1.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 14489
  • Score
    100M100P100Q140808F
  • License MIT

hapi extension to enable CORS

Package Exports

  • hapi-cors-headers

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (hapi-cors-headers) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

hapi-cors-headers

hapi extension to enable CORS

Build Status Coverage Status Greenkeeper badge

Enables CORS on all server response, securely from all origins, with access-control-allow-credentials: true.

Example

var Hapi = require('hapi')
var corsHeaders = require('hapi-cors-headers')

var server = new Hapi.Server()
// setup routes etc ...

server.ext('onPreResponse', corsHeaders)

Install

npm install --save hapi-cors-headers

Test

devDependency Status

npm test

License

MIT