$ yarn add wss-origin
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
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
wss-origin © zcong1993, Released under the MIT License.
Authored and maintained by zcong1993 with help from contributors (list).
github.com/zcong1993 · GitHub @zcong1993