fix 404
This commit is contained in:
parent
7e8297bb8b
commit
2d6e58d41d
4
app.js
4
app.js
@ -291,7 +291,11 @@ app.get('/rss', (req, res) => {
|
|||||||
|
|
||||||
// Global 404 handler for unmatched routes
|
// Global 404 handler for unmatched routes
|
||||||
app.use((req, res) => {
|
app.use((req, res) => {
|
||||||
|
if (req.hostname === hostname) {
|
||||||
|
res.redirect(process.env.HOST_URL);
|
||||||
|
} else {
|
||||||
res.redirect('/');
|
res.redirect('/');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Server Listening
|
// Server Listening
|
||||||
|
Loading…
Reference in New Issue
Block a user