diff options
| author | Jannis R <mail@jannisr.de> | 2021-03-03 13:58:44 +0100 |
|---|---|---|
| committer | Jannis R <mail@jannisr.de> | 2021-03-03 13:58:46 +0100 |
| commit | 2bc162b388aa7b139a8807d4479030e4b168f2f7 (patch) | |
| tree | a072276682db94bfb8fc30559123c0dc54282868 /readme.md | |
| parent | ec8e8c67083404440d40067e5a40351521295397 (diff) | |
add linter, minor tweaks, 1.2.0
- add debug logging to connect()
- readme: document verifyAlpnId() 📝
Diffstat (limited to 'readme.md')
| -rw-r--r-- | readme.md | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -114,6 +114,9 @@ createServer(opt = {}, onRequest) cert: null, key: null, passphrase: null, // additional options to be passed into `tls.createServer` tlsOpt: {}, + // verify the ALPN ID requested by the client + // see https://de.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation + verifyAlpnId: alpnId => alpnId ? alpnId === ALPN_ID : true, } ``` @@ -139,6 +142,9 @@ request(pathOrUrl, opt = {}, cb) connectTimeout: 60 * 1000, // 60s // additional options to be passed into `tls.connect` tlsOpt: {}, + // verify the ALPN ID chosen by the server + // see https://de.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation + verifyAlpnId: alpnId => alpnId ? (alpnId === ALPN_ID) : true, } ``` |
