summaryrefslogtreecommitdiffstats
path: root/readme.md
diff options
context:
space:
mode:
authorJannis R <mail@jannisr.de>2021-03-03 13:58:44 +0100
committerJannis R <mail@jannisr.de>2021-03-03 13:58:46 +0100
commit2bc162b388aa7b139a8807d4479030e4b168f2f7 (patch)
treea072276682db94bfb8fc30559123c0dc54282868 /readme.md
parentec8e8c67083404440d40067e5a40351521295397 (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.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/readme.md b/readme.md
index 3b3ff89..7739b06 100644
--- a/readme.md
+++ b/readme.md
@@ -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,
}
```