diff options
| author | mauve <ranger@mauve.moe> | 2020-08-18 15:43:08 -0400 |
|---|---|---|
| committer | Jannis Redmann <mail@jannisr.de> | 2020-08-19 16:34:35 +0200 |
| commit | 93626a3d88b3a5da464e27e0045ac49dcb378c36 (patch) | |
| tree | bc35a529cd69d304db453f1e66577f0f1ebde4a2 /client.js | |
| parent | 72abf040ac48253399787a60244318c0500b4770 (diff) | |
Adjust APN ID logic
Diffstat (limited to 'client.js')
| -rw-r--r-- | client.js | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -19,7 +19,7 @@ const _request = (pathOrUrl, opt, cb) => { const { verifyAlpnId, } = { - verifyAlpnId: alpnId => alpnId === ALPN_ID, + verifyAlpnId: alpnId => alpnId ? (alpnId === ALPN_ID) : true, ...opt, } @@ -163,9 +163,10 @@ const sendGeminiRequest = (pathOrUrl, opt, done) => { hostname: target.hostname || 'localhost', port: target.port || DEFAULT_PORT, tlsOpt, - verifyAlpnId, } + if (verifyAlpnId) reqOpt.verifyAlpnId = verifyAlpnId + let cb = (err, res) => { if (err) return done(err) |
