diff --git a/api/post/postComment.js b/api/post/postComment.js index 806ba37..15c0228 100644 --- a/api/post/postComment.js +++ b/api/post/postComment.js @@ -47,7 +47,7 @@ module.exports = async (app, req, res) => { request.post(app.endpoint + 'uploadGJComment21.php', { form: params, - headers: {'x-forwarded-for': req.headers['x-forwarded-for'] || req.connection.remoteAddress} // prevent pesky ip bans + headers: {'x-forwarded-for': req.headers['x-real-ip']} // prevent pesky ip bans }, function (err, resp, body) { if (err) return res.status(400).send("The Geometry Dash servers returned an error! Perhaps they're down for maintenance") if (!body || body == "-1") return res.status(400).send("The Geometry Dash servers rejected your comment! Try again later, or make sure your username and password are entered correctly.") diff --git a/index.js b/index.js index 1f287ba..338b096 100644 --- a/index.js +++ b/index.js @@ -54,8 +54,6 @@ app.parseResponse = function (responseBody, splitter) { //xss bad app.clean = function(text) {if (!text || typeof text != "string") return text; else return text.replace(/&/g, "&").replace(//g, ">").replace(/=/g, "=").replace(/"/g, """).replace(/'/g, "'")} -console.log("Site online!") - // ASSETS @@ -142,4 +140,4 @@ app.get('*', function(req, res) { else res.redirect('/search/404%20') }); -app.listen(2000); \ No newline at end of file +app.listen(2000, () => console.log("Site online!")) \ No newline at end of file