More IP tweaks
This commit is contained in:
parent
584320e3c8
commit
27730bfcea
2 changed files with 2 additions and 4 deletions
|
@ -47,7 +47,7 @@ module.exports = async (app, req, res) => {
|
||||||
|
|
||||||
request.post(app.endpoint + 'uploadGJComment21.php', {
|
request.post(app.endpoint + 'uploadGJComment21.php', {
|
||||||
form: params,
|
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) {
|
}, 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 (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.")
|
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.")
|
||||||
|
|
4
index.js
4
index.js
|
@ -54,8 +54,6 @@ app.parseResponse = function (responseBody, splitter) {
|
||||||
//xss bad
|
//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, """).replace(/'/g, "'")}
|
app.clean = function(text) {if (!text || typeof text != "string") return text; else return text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/=/g, "=").replace(/"/g, """).replace(/'/g, "'")}
|
||||||
|
|
||||||
console.log("Site online!")
|
|
||||||
|
|
||||||
|
|
||||||
// ASSETS
|
// ASSETS
|
||||||
|
|
||||||
|
@ -142,4 +140,4 @@ app.get('*', function(req, res) {
|
||||||
else res.redirect('/search/404%20')
|
else res.redirect('/search/404%20')
|
||||||
});
|
});
|
||||||
|
|
||||||
app.listen(2000);
|
app.listen(2000, () => console.log("Site online!"))
|
Loading…
Reference in a new issue