From 1e0ee575433cf7b5d74c17465f14094b25f595c4 Mon Sep 17 00:00:00 2001 From: Dustin Decker Date: Mon, 6 Feb 2023 09:36:28 -0800 Subject: [PATCH] allow case sensitive routing (#43) --- app.js | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/app.js b/app.js index 3cc76e9..a572a86 100644 --- a/app.js +++ b/app.js @@ -85,22 +85,7 @@ async function get_app_server() { // I have a question for Express: // https://youtu.be/ZtjFsQBuJWw?t=4 app.set('case sensitive routing', true); - - // Making 100% sure this works like it should - // https://youtu.be/aCbfMkh940Q?t=6 - app.use(async function(req, res, next) { - if(req.path.toLowerCase() === req.path) { - next(); - return - } - - res.status(401).json({ - "success": false, - "error": "No.", - "code": "WHY_ARE_YOU_SHOUTING" - }).end(); - }); - + app.use(bodyParser.json()); // Set security-related headers on requests