This commit is contained in:
@@ -26,7 +26,7 @@ const domainRedirectPlugin = (targetUrl: string, useSubdomains: boolean, debug:
|
|||||||
// Przekieruj jeśli:
|
// Przekieruj jeśli:
|
||||||
// 1. To subdomena localhosta (do testów)
|
// 1. To subdomena localhosta (do testów)
|
||||||
// 2. LUB to subdomena ktty.is, a subdomeny są wyłączone
|
// 2. LUB to subdomena ktty.is, a subdomeny są wyłączone
|
||||||
if ((isSubdomainOfLocalhost && hostname !== 'localhost') || (!useSubdomains && hostname !== targetHost && !isPureLocalhost)) {
|
if ((isSubdomainOfLocalhost && hostname !== 'localhost') || (useSubdomains && hostname !== targetHost && !isPureLocalhost)) {
|
||||||
if (debug) console.log(`[Redirect] Z ${hostname} na ${targetUrl}`);
|
if (debug) console.log(`[Redirect] Z ${hostname} na ${targetUrl}`);
|
||||||
|
|
||||||
res.writeHead(301, { Location: `${targetUrl}${req.url}` });
|
res.writeHead(301, { Location: `${targetUrl}${req.url}` });
|
||||||
|
|||||||
Reference in New Issue
Block a user