fix 404
This commit is contained in:
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
|
||||||
|
Reference in New Issue
Block a user