Redirect www subdomain to landingPage if the tunnel does not exist #149
@@ -134,6 +134,11 @@ export default function(opt) {
|
|||||||
|
|
||||||
const client = manager.getClient(clientId);
|
const client = manager.getClient(clientId);
|
||||||
if (!client) {
|
if (!client) {
|
||||||
|
if (clientId === 'www') {
|
||||||
|
res.writeHead(301, {'Location' : landingPage});
|
||||||
|
res.end();
|
||||||
|
return;
|
||||||
|
}
|
||||||
res.statusCode = 404;
|
res.statusCode = 404;
|
||||||
res.end('404');
|
res.end('404');
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user