From cc11c39b67021a62c72a377baaa5ed10ea4273a9 Mon Sep 17 00:00:00 2001 From: TheEmeraldStarr <46467239+Epicloudygamer@users.noreply.github.com> Date: Sat, 1 May 2021 21:14:28 -0700 Subject: [PATCH] Fixed a simple mistake --- app.js | 13 ++++++------- package.json | 3 ++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app.js b/app.js index b05cb2e0..5daf286b 100644 --- a/app.js +++ b/app.js @@ -4,8 +4,7 @@ * MIT license: http://opensource.org/licenses/MIT * ----------------------------------------------- */ const - char_insert = require('./src/charinsert.js'), - alloy = require('./src/alloyproxy'), + alloy = require('./src/alloyproxy'), path = require('path'), config = require('./config.json'), fs = require('fs'), @@ -126,11 +125,11 @@ function tryReadFile(file) { // Local alloy proxy const localAlloy = new alloy({ - prefix: '/fetch/', - error: (proxy) => { proxy.res.send(tryReadFile(path.normalize(__dirname + '/views/error.html')).replace('%ERR%', proxy.error.info.message.replace(/<|>/g, ''))); }, // Doing replace functions on "<" and ">" to prevent XSS. - request: [], - response: [], - injection: true + prefix: '/fetch/', + error: (proxy) => { proxy.res.send(tryReadFile(path.normalize(__dirname + '/views/error.html')).replace('%ERR%', proxy.error.info.message.replace(/<|>/g, ''))); }, // Doing replace functions on "<" and ">" to prevent XSS. + request: [], + response: [], + injection: true }); app.use(localAlloy.app); localAlloy.ws(server); diff --git a/package.json b/package.json index 60520f5f..8b5c3a76 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "license": "MIT", "dependencies": { "express": "^4.17.1", - "mime-types": "^2.1.27" + "mime-types": "^2.1.27", + "ws": "^7.4.0" } }