Skip to content

zcong1993/wss-origin

Repository files navigation

wss-origin

NPM version NPM downloads CircleCI

Install

$ yarn add wss-origin

Usage

const WssOrigin = require('wss-origin')

const wss = new WssOrigin({
  port: 9999
}, ['http://test.com'])

// client from 'http://test.com' can connect, others will get 403
// node only with option { origin: 'http://test.com' } can pass

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

wss-origin © zcong1993, Released under the MIT License.
Authored and maintained by zcong1993 with help from contributors (list).

github.com/zcong1993 · GitHub @zcong1993

About

node ws server easy origin verify

Resources

License

Stars

Watchers

Forks

Packages

No packages published