summaryrefslogtreecommitdiffstats
path: root/server.js
diff options
context:
space:
mode:
Diffstat (limited to 'server.js')
-rw-r--r--server.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/server.js b/server.js
index 285b63b..cef2c4c 100644
--- a/server.js
+++ b/server.js
@@ -22,6 +22,11 @@ const createGeminiServer = (opt = {}, onRequest) => {
}
const onConnection = (socket) => {
+ // todo: clarify if this is desired behavior
+ if (socket.alpnProtocol !== ALPN_ID) {
+ socket.destroy()
+ return;
+ }
if (
socket.authorizationError &&
// allow self-signed certs