Fastify: How to use a .CER and .PFX files to Https?

Created on 25 Feb 2019  路  2Comments  路  Source: fastify/fastify

Hi everyone I'm starting using your amazing framework, but now I'm trying to install a private cetificate, but I'm researching that fastify use a cer and key files to enable HTTPS, How I could enable HTTPS on my API with a cer and pfx files?

question

Most helpful comment

Hi,

As it is stated in the documentation (https://www.fastify.io/docs/latest/Server/), https options must be an object that accept the same entries that Node.js core createServer method allows.
Here you can find all options that are accepted to create a secure context: Node.js 10.15.1 LTS docs. In your case you need to pass a pfx property.

All 2 comments

Hi,

As it is stated in the documentation (https://www.fastify.io/docs/latest/Server/), https options must be an object that accept the same entries that Node.js core createServer method allows.
Here you can find all options that are accepted to create a secure context: Node.js 10.15.1 LTS docs. In your case you need to pass a pfx property.

@ketrujillo08 Closing this, feel free to reopen if needed

@darkgl0w thanks for the help!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

valentinvichnal picture valentinvichnal  路  3Comments

avilang picture avilang  路  3Comments

rqbazan picture rqbazan  路  3Comments

PacoDu picture PacoDu  路  3Comments

aaronshaf picture aaronshaf  路  3Comments