Redirect www subdomain to landingPage if the tunnel does not exist

Signed-off-by: daniml3 <[email protected]>
This commit is contained in:
daniml3
2021-02-06 16:48:42 +01:00
parent 78c06f8fc4
commit 04edba1e0f
+5
View File
@@ -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;