Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zcong1993/wss-origin
node ws server easy origin verify
https://github.com/zcong1993/wss-origin
Last synced: about 23 hours ago
JSON representation
node ws server easy origin verify
- Host: GitHub
- URL: https://github.com/zcong1993/wss-origin
- Owner: zcong1993
- License: mit
- Created: 2018-03-16T10:05:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-02-15T09:00:24.000Z (over 5 years ago)
- Last Synced: 2024-09-30T13:37:15.309Z (about 1 month ago)
- Language: JavaScript
- Size: 46.9 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wss-origin
[![NPM version](https://img.shields.io/npm/v/wss-origin.svg?style=flat)](https://npmjs.com/package/wss-origin) [![NPM downloads](https://img.shields.io/npm/dm/wss-origin.svg?style=flat)](https://npmjs.com/package/wss-origin) [![CircleCI](https://circleci.com/gh/zcong1993/wss-origin/tree/master.svg?style=shield)](https://circleci.com/gh/zcong1993/wss-origin/tree/master)
## Install
```sh
$ yarn add wss-origin
```## Usage
```js
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](https://github.com/zcong1993), Released under the [MIT](./LICENSE) License.
Authored and maintained by zcong1993 with help from contributors ([list](https://github.com/zcong1993/wss-origin/contributors)).> [github.com/zcong1993](https://github.com/zcong1993) · GitHub [@zcong1993](https://github.com/zcong1993)