blog/filterRoutes.js

20 lines
604 B
JavaScript
Raw Normal View History

const express = require('express');
const router = express.Router();
2021-01-28 14:14:04 +00:00
const blackHole = function (req, res) {};
2021-01-28 14:08:09 +00:00
router.all('(/*)?/wp-admin/', blackHole);
router.all(/.*\.php$/, blackHole);
router.all(/.*\.aspx$/, blackHole);
router.all('(/*)?/wp-includes/(*)?', blackHole);
router.all('/.git/*?', blackHole);
router.all('/.env', blackHole);
router.all('/autodiscover/autodiscover.xml', blackHole)
router.all('/.well-known/autoconfig(/.*)?', blackHole)
router.all('/admin(/.*)?', blackHole)
router.post('*', blackHole);
router.put('*', blackHole);
router.delete('*', blackHole);
module.exports = router