aboutsummaryrefslogtreecommitdiff
path: root/server/http.js
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2021-12-04 13:14:41 +0100
committerMinteck <contact@minteck.org>2021-12-04 13:14:41 +0100
commitdbbc2d3692acaf0c3e54647a0b5fc4d03f5d79c3 (patch)
treefc1ef63efc15ac1e8c0e49ab9b1b3d296a67ed82 /server/http.js
parente618c3f52c1c4ae161650679cda24eecbba579bb (diff)
downloadwolfeye-js-dbbc2d3692acaf0c3e54647a0b5fc4d03f5d79c3.tar.gz
wolfeye-js-dbbc2d3692acaf0c3e54647a0b5fc4d03f5d79c3.tar.bz2
wolfeye-js-dbbc2d3692acaf0c3e54647a0b5fc4d03f5d79c3.zip
New stuff
Diffstat (limited to 'server/http.js')
-rw-r--r--server/http.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/http.js b/server/http.js
index 465b726..fed72a7 100644
--- a/server/http.js
+++ b/server/http.js
@@ -13,6 +13,11 @@ module.exports.start = function () {
http.createServer(function (req, res) {
global.res = res;
+
+ if (req.url.length > 1 && req.url.endsWith("/")) {
+ req.url = req.url.substr(0, req.url.length - 1);
+ }
+
req.url_orig = req.url;
req.url_arg = req.url.split("?")[1];
req.url = req.url.split("?")[0];