MCPcopy
hub / github.com/digitalocean/nginxconfig.io / sslConfig

Function sslConfig

src/nginxconfig/generators/conf/website.conf.js:44–61  ·  view source on GitHub ↗
(domain, global)

Source from the content-addressed store, hash-verified

42import phpUpstream from '../../util/php_upstream.js';
43
44const 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
63const httpsListen = (domain, global, ipPortPairs) => {
64 const config = [];

Callers 1

website.conf.jsFile · 0.85

Calls 2

getSslCertificateFunction · 0.90
getSslCertificateKeyFunction · 0.90

Tested by

no test coverage detected