Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/platformatic/undici-tls-dispatcher
https://github.com/platformatic/undici-tls-dispatcher
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/platformatic/undici-tls-dispatcher
- Owner: platformatic
- License: apache-2.0
- Created: 2023-05-03T10:05:18.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-30T05:07:42.000Z (8 months ago)
- Last Synced: 2024-05-06T12:24:35.984Z (8 months ago)
- Language: JavaScript
- Size: 414 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# undici-tls-dispatcher
An undici dispatcher to enable TLS for given URLs
## Install
```
npm i undici-tls-dispatcher
```## Usage
```js
const UndiciTLSDispatcher = require('undici-tls-dispatcher')
const dispatcher = new UndiciTLSDispatcher({
tlsConfig: [
{
url: 'https://yourserver.com',
tls: {
ca: '...'
cert: '...'
key: '...'
}
}
]
})const res = await request(httpsServerUrl, { dispatcher })
...
```See `test.js` for a complete example.
## LicenseApache 2.0