From 04edba1e0f53458001201d99527310fa90f65937 Mon Sep 17 00:00:00 2001 From: daniml3 Date: Sat, 6 Feb 2021 16:48:42 +0100 Subject: [PATCH] Redirect www subdomain to landingPage if the tunnel does not exist Signed-off-by: daniml3 --- server.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server.js b/server.js index 21a4af6..10c4da3 100644 --- a/server.js +++ b/server.js @@ -134,6 +134,11 @@ export default function(opt) { const client = manager.getClient(clientId); if (!client) { + if (clientId === 'www') { + res.writeHead(301, {'Location' : landingPage}); + res.end(); + return; + } res.statusCode = 404; res.end('404'); return; -- 2.54.0