Skip to content

platformatic/undici-tls-dispatcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

undici-tls-dispatcher

An undici dispatcher to enable TLS for given URLs

Install

npm i undici-tls-dispatcher

Usage

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.

License

Apache 2.0

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •