diff options
| author | Martijn de Boer <github@sexybiggetje.nl> | 2020-10-15 15:30:25 +0200 |
|---|---|---|
| committer | Jannis R <mail@jannisr.de> | 2020-10-16 14:53:53 +0200 |
| commit | de966dd2860166801941b757805806c26ccc46e8 (patch) | |
| tree | 904bbfe8da48ec5de9a8babbc7b0c924cfb403ec | |
| parent | 5a23ee66f3f0018187a898b3ae4bd609ff9d4e3e (diff) | |
remove ALPN protocol ID
When setting the ALPN protocol the gemini browser Kristall won't connect properly. While removing this, per suggestion in #5, connection seems to be working properly.
more info: https://lists.orbitalfox.eu/archives/gemini/2020/002848.html
With this commit,
- the server will only verify the ALPN ID to be `gemini` if the client has sent one
- the server won't send the ALPN ID anymore
closes #5
| -rw-r--r-- | server.js | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -21,7 +21,7 @@ const createGeminiServer = (opt = {}, onRequest) => { } = { cert: null, key: null, passphrase: null, tlsOpt: {}, - verifyAlpnId: alpnId => alpnId === ALPN_ID, + verifyAlpnId: alpnId => alpnId ? alpnId === ALPN_ID : true, ...opt, } @@ -85,7 +85,9 @@ const createGeminiServer = (opt = {}, onRequest) => { } const server = createTlsServer({ - ALPNProtocols: [ALPN_ID], + // Disabled ALPNProtocols to mitigate connection issues in gemini + // clients as reported in #5 + // ALPNProtocols: [ALPN_ID], minVersion: MIN_TLS_VERSION, // > Usually the server specifies in the Server Hello message if a // > client certificate is needed/wanted. |
