Answers for "HTTPS LOCAL"

0

HTTPS LOCAL

...
-config <(cat /System/Library/OpenSSL/openssl.cnf \
    <(printf '[SAN]\nsubjectAltName=DNS:localhost.caffeinecoding.com,DNS:*.localhost.caffeinecoding.com')) \
Posted by: Guest on September-08-2021
0

HTTPS LOCAL

import https from 'https'
import fs from 'fs'
import resolvePath from 'resolve-path'

// ...

if (env === DEVELOPMENT') {
    const options = {
        key: fs.readFileSync(resolvePath('./configs/sslcerts/server.key')),
        cert: fs.readFileSync(resolvePath('./configs/sslcerts/server.crt'))
    }

    https.createServer(options, server).listen(port, () => {
        logger.debug(msg)
    })
}
Posted by: Guest on September-08-2021
0

HTTPS LOCAL

openssl req \
    -newkey rsa:2048 \
    -x509 \
    -nodes \
    -keyout server.key \
    -new \
    -out server.crt \
    -subj /CN=localhost \
    -reqexts SAN \
    -extensions SAN \
    -config <(cat /System/Library/OpenSSL/openssl.cnf \
        <(printf '[SAN]\nsubjectAltName=DNS:localhost')) \
    -sha256 \
    -days 3650
Posted by: Guest on September-08-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language