Compare commits
2 Commits
7bc1e8d928
...
490c1cc724
| Author | SHA256 | Date | |
|---|---|---|---|
|
|
490c1cc724 | ||
|
|
ef9f6ba9c7 |
3
index.js
3
index.js
@@ -53,7 +53,7 @@ function verifyToken(token) {
|
|||||||
return split[0];
|
return split[0];
|
||||||
}
|
}
|
||||||
function sanitiseStringHTML(str) {
|
function sanitiseStringHTML(str) {
|
||||||
return str.replaceAll(">", ">").replaceAll("<", "<");
|
return str.replaceAll("&", "&").replaceAll(">", ">").replaceAll("<", "<");
|
||||||
}
|
}
|
||||||
|
|
||||||
app.use(express.urlencoded());
|
app.use(express.urlencoded());
|
||||||
@@ -78,6 +78,7 @@ app.use((req, res, next) => {
|
|||||||
const geo = geoip.lookup(req.headers['x-forwarded-for']);
|
const geo = geoip.lookup(req.headers['x-forwarded-for']);
|
||||||
console.log(geo);
|
console.log(geo);
|
||||||
|
|
||||||
|
if (geo)
|
||||||
if (geo.country !== "US")
|
if (geo.country !== "US")
|
||||||
if (geo.country !== "UA")
|
if (geo.country !== "UA")
|
||||||
if (geo.country !== "PL") {
|
if (geo.country !== "PL") {
|
||||||
|
|||||||
Reference in New Issue
Block a user