parent
005a9fdc01
commit
c6ae969a82
@ -7,6 +7,7 @@ import has from 'lodash/has'
|
|||||||
import helmet from 'helmet'
|
import helmet from 'helmet'
|
||||||
import includes from 'lodash/includes'
|
import includes from 'lodash/includes'
|
||||||
import proxyConsole from './proxy-console'
|
import proxyConsole from './proxy-console'
|
||||||
|
import pw from 'pw'
|
||||||
import serveStatic from 'serve-static'
|
import serveStatic from 'serve-static'
|
||||||
import startsWith from 'lodash/startsWith'
|
import startsWith from 'lodash/startsWith'
|
||||||
import stoppable from 'stoppable'
|
import stoppable from 'stoppable'
|
||||||
@ -311,6 +312,13 @@ async function makeWebServerListen (
|
|||||||
) {
|
) {
|
||||||
if (cert && key) {
|
if (cert && key) {
|
||||||
;[opts.cert, opts.key] = await Promise.all([readFile(cert), readFile(key)])
|
;[opts.cert, opts.key] = await Promise.all([readFile(cert), readFile(key)])
|
||||||
|
if (opts.key.includes('ENCRYPTED')) {
|
||||||
|
opts.passphrase = await new Promise(resolve => {
|
||||||
|
console.log('Encrypted key %s', key)
|
||||||
|
process.stdout.write(`Enter pass phrase: `)
|
||||||
|
pw(resolve)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const niceAddress = await webServer.listen(opts)
|
const niceAddress = await webServer.listen(opts)
|
||||||
|
Loading…
Reference in New Issue
Block a user