Last active
May 25, 2016 21:12
-
-
Save edwinschaap/9fed02bfa72d29021d7f6b4e93b5650b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const https = require('https'); | |
const options = { | |
key: fs.readFileSync('key.pem'), | |
cert: fs.readFileSync('cert.pem') | |
}; | |
https.createServer(options, (req, res) => { | |
res.writeHead(200); | |
res.end('hello world\n'); | |
}).listen(443); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ca: fs.readFileSync('chain.pem') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https.createServer(options, (req, res) => { | |
res.writeHead(200, { | |
"Strict-Transport-Security": "max-age=31536000" | |
}); | |
res.end('hello world\n'); | |
}).listen(443); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
secureProtocol: "TLSv1_2_method" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ecdhCurve: 'secp384r1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ciphers: "HIGH:!aNULL:!MD5:!3DES:!CAMELLIA:!AES128" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require('fs'); | |
const https = require('https'); | |
const options = { | |
key: fs.readFileSync('key.pem'), | |
cert: fs.readFileSync('cert.pem'), | |
ca: fs.readFileSync('chain.pem'), | |
secureProtocol: "TLSv1_2_method", | |
ecdhCurve: 'secp384r1', | |
ciphers: "HIGH:!aNULL:!MD5:!3DES:!CAMELLIA:!AES128" | |
}; | |
https.createServer(options, (req, res) => { | |
res.writeHead(200, { | |
"Strict-Transport-Security": "max-age=31536000" | |
}); | |
res.end('hello world\n'); | |
}).listen(443); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment