Compare commits
3 Commits
e348daa341
...
09b375f666
Author | SHA1 | Date | |
---|---|---|---|
09b375f666 | |||
7a4e1324ee | |||
2da5dd313c |
7
app.js
7
app.js
@ -26,6 +26,13 @@ const oneDay = 86400000;
|
||||
app.use(compress());
|
||||
app.use(express.static(__dirname + '/build'));
|
||||
|
||||
// Lets try and slow down some of those exploit crawlers
|
||||
app.use("/", require('./filterRoutes'))
|
||||
|
||||
app.get("/robots.txt", function(reg, res) {
|
||||
res.send("User-agent: * Disallow: ")
|
||||
})
|
||||
|
||||
var md = markdown({html: true});
|
||||
md.parser.use(emoji);
|
||||
|
||||
|
10
filterRoutes.js
Normal file
10
filterRoutes.js
Normal file
@ -0,0 +1,10 @@
|
||||
const express = require('express');
|
||||
|
||||
const router = express.Router();
|
||||
router.all('(/*)?/wp-admin/', function (req, res) {});
|
||||
router.all('*?/xmlrpc.php', function (req, res) {});
|
||||
router.all('(/*)?/wp-includes/(*)?', function (req, res) {});
|
||||
router.all('/.git/*?', function (req, res) {});
|
||||
router.all('/wp-login.php', function (req, res) {});
|
||||
|
||||
module.exports = router
|
@ -6,7 +6,7 @@ tags: nodejs node npm javascript truncatise ghost
|
||||
summary: "Today I finally got around to modifying my <a href='https://ghost.org/' target='_blank'>Ghost</a> blog to make use of my new Node Module <a href='//blog.marcusnoble.co.uk/publishing-my-first-npm-module/'>Truncatise</a>.<br/><br/>This didn't go as smoothly as I hoped."
|
||||
---
|
||||
|
||||
Today I finally got around to modifying my [Ghost](https://ghost.org/) blog to make use of my new Node Module [Truncatise](/10-29-2013-publishing-my-first-npm-module/).
|
||||
Today I finally got around to modifying my [Ghost](https://ghost.org/) blog to make use of my new Node Module [Truncatise](/29-10-2013-publishing-my-first-npm-module/).
|
||||
|
||||
This didn't go as smoothly as I hoped.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user