仅当 ['https', 'httpall'].indexOf(wo.Config.protocol) 时才创建 greenlock
This commit is contained in:
parent
a3f4809870
commit
1e324a2498
@ -72,7 +72,7 @@ async function init(){ /*** 设置全局对象 ***/
|
||||
const express=require('express')
|
||||
const server = express()
|
||||
|
||||
const greenlock = (wo.Config.sslType === 'greenlock') ? require('greenlock-express').create({
|
||||
const greenlock = (['https', 'httpall'].indexOf(wo.Config.protocol)>=0 && wo.Config.sslType === 'greenlock') ? require('greenlock-express').create({
|
||||
version: 'draft-11',
|
||||
server: 'https://acme-v02.api.letsencrypt.org/directory', // for test: acme-staging-v02
|
||||
agreeTos: true,
|
||||
|
Loading…
Reference in New Issue
Block a user