(domain, global)
| 42 | import phpUpstream from '../../util/php_upstream.js'; |
| 43 | |
| 44 | const sslConfig = (domain, global) => { |
| 45 | const config = []; |
| 46 | if (domain.https.https.computed) { |
| 47 | config.push(['# SSL', '']); |
| 48 | config.push(['ssl_certificate', getSslCertificate(domain, global)]); |
| 49 | config.push(['ssl_certificate_key', getSslCertificateKey(domain, global)]); |
| 50 | |
| 51 | // Let's encrypt |
| 52 | if (domain.https.certType.computed === 'letsEncrypt') |
| 53 | config.push([ |
| 54 | 'ssl_trusted_certificate', |
| 55 | `${global.https.letsEncryptCertRoot.computed.replace(/\/+$/, '')}/${ |
| 56 | domain.server.domain.computed |
| 57 | }/chain.pem`, |
| 58 | ]); |
| 59 | } |
| 60 | return config; |
| 61 | }; |
| 62 | |
| 63 | const httpsListen = (domain, global, ipPortPairs) => { |
| 64 | const config = []; |
no test coverage detected