Handle some 404's better
This commit is contained in:
parent
eeebcd3472
commit
c10c858988
15
app.js
15
app.js
@ -29,12 +29,23 @@ app.use(express.static(__dirname + '/build'));
|
|||||||
// Lets try and slow down some of those exploit crawlers
|
// Lets try and slow down some of those exploit crawlers
|
||||||
app.use("/", require('./filterRoutes'));
|
app.use("/", require('./filterRoutes'));
|
||||||
|
|
||||||
|
// Handle some iOS icon 404s
|
||||||
|
app.get("/apple-touch-icon*", function(req, res) {
|
||||||
|
res.sendFile(__dirname + '/build/images/favico/' + req.url, () => {
|
||||||
|
res.sendFile(__dirname + '/build/images/favico/apple-touch-icon.png');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
app.get("/favicon.png", function(req, res) {
|
||||||
|
res.sendFile(__dirname + '/build/images/favico/apple-touch-icon.png');
|
||||||
|
});
|
||||||
|
|
||||||
app.get("/robots.txt", function(req, res) {
|
app.get("/robots.txt", function(req, res) {
|
||||||
res.send("User-agent: * Disallow: ");
|
res.send("User-agent: * Disallow: ");
|
||||||
})
|
})
|
||||||
|
|
||||||
app.get(/\/(feed|rss)\/?$/, function(req, res) {
|
app.get(/(\/(feeds?|rss|atom)\/?|feed.xml|rss.xml|index.rss|feed.rss)$/, function(req, res) {
|
||||||
res.redirect('/feed.xml');
|
res.redirect(301, '/feed.xml');
|
||||||
})
|
})
|
||||||
|
|
||||||
app.get("/healthz", function(req, res) {
|
app.get("/healthz", function(req, res) {
|
||||||
|
BIN
src/images/favico/apple-touch-icon-precomposed.png
Normal file
BIN
src/images/favico/apple-touch-icon-precomposed.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
BIN
src/images/favico/apple-touch-icon.png
Normal file
BIN
src/images/favico/apple-touch-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
@ -18,6 +18,7 @@
|
|||||||
<!-- Twitter Do Not Track -->
|
<!-- Twitter Do Not Track -->
|
||||||
<meta name="twitter:dnt" content="on">
|
<meta name="twitter:dnt" content="on">
|
||||||
|
|
||||||
|
<link rel="apple-touch-icon" href="/images/favico/apple-icon-180x180.png"/>
|
||||||
<link rel="apple-touch-icon" sizes="57x57" href="/images/favico/apple-icon-57x57.png">
|
<link rel="apple-touch-icon" sizes="57x57" href="/images/favico/apple-icon-57x57.png">
|
||||||
<link rel="apple-touch-icon" sizes="60x60" href="/images/favico/apple-icon-60x60.png">
|
<link rel="apple-touch-icon" sizes="60x60" href="/images/favico/apple-icon-60x60.png">
|
||||||
<link rel="apple-touch-icon" sizes="72x72" href="/images/favico/apple-icon-72x72.png">
|
<link rel="apple-touch-icon" sizes="72x72" href="/images/favico/apple-icon-72x72.png">
|
||||||
|
Loading…
Reference in New Issue
Block a user