BREAKING CHANGE: General Bots is now 3.0.

This commit is contained in:
Rodrigo Rodriguez 2023-07-09 20:09:55 -03:00
parent 1497119904
commit c79d226aff

View file

@ -281,9 +281,10 @@ export class GBServer {
// Setups unsecure http redirect. // Setups unsecure http redirect.
const server1 = http.createServer((req, res) => { const server1 = http.createServer((req, res) => {
const host = req.headers.host.startsWith('www.') ?
req.headers.host.substring(4) : req.headers.host;
res.writeHead(301, { res.writeHead(301, {
Location: "https://" + req.headers.host + req.url Location: "https://" + host + req.url
}).end(); }).end();
}); });