Simplifying redirection code for requests to the root domain
This commit is contained in:
parent
282a45d9ee
commit
be9557b8a9
@ -7,7 +7,7 @@ const app = express();
|
||||
|
||||
// Handle requests for the root page by serving the static index.html from the views folder
|
||||
app.get("/", function(req, res) {
|
||||
if (!req.headers['x-real-host'] && req.headers.host.includes('glitch.me')) {
|
||||
if (req.headers.host.includes('glitch.me')) {
|
||||
return res.redirect('https://www.jasonsplant.ml' + req.url);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user