🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

fastify-mtls

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-mtls - npm Package Compare versions

Comparing version

to
1.0.1

23

index.js
const fp = require('fastify-plugin')
const getCertificate = require('vault-pki-fetcher')
async function fastifyMTLS (app, options, done) {
app.addHook('onReady', async () => {
const tls = await getCertificate(options)
const { key, cert, ca } = tls
app.decorate('mtls', {
key, cert, ca
})
app.server.setSecureContext({
key,
cert,
ca
})
async function fastifyMTLS (app, options) {
const tls = await getCertificate(options)
const { key, cert, ca } = tls
app.decorate('mtls', {
key, cert, ca
})
done()
app.server.setSecureContext({
key,
cert,
ca
})
}

@@ -19,0 +16,0 @@

{
"name": "fastify-mtls",
"version": "1.0.0",
"version": "1.0.1",
"description": "Enables mTLS on a Fastify server",

@@ -5,0 +5,0 @@ "main": "index.js",