fastify-https-redirect
Advanced tools
Weekly downloads
Readme
A plugin for Fastify that adds support for http => https redirects.
npm install fastify-https-redirect
const server = Fastify({
http2: true,
https: {
allowHTTP1: true,
key: fs.readFileSync(path.resolve(__dirname, './yourSSL.key')),
cert: fs.readFileSync(path.resolve(__dirname, './yourSSL.cert')),
},
});
server.register(httpsRedirect);
With custom http Port
const server = Fastify({
http2: true,
https: {
allowHTTP1: true,
key: fs.readFileSync(path.resolve(__dirname, './yourSSL.key')),
cert: fs.readFileSync(path.resolve(__dirname, './yourSSL.cert')),
},
});
server.register(httpsRedirect, {httpPort:1080});
With custom http Port and https redirect Port
server.register(httpsRedirect,{httpPort:1080, httpsPort:10443});
FAQs
Plugin for fastify to forward http requests to https
The npm package fastify-https-redirect receives a total of 593 weekly downloads. As such, fastify-https-redirect popularity was classified as not popular.
We found that fastify-https-redirect demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.