UNPKG

https-tls

Version:

Setup HTTPS details related to TLS according to the User Agent provided.

22 lines (16 loc) 386 B
'use strict' const { getHeader } = require('./src/headers') const tls = require('.') module.exports = options => { const https = options.https ?? {} if ( https.ciphers || https.signatureAlgorithms || https.minVersion || https.maxVersion ) { return } const userAgent = getHeader('user-agent', options.headers) options.https = tls(userAgent, https) }