aboutsummaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-06-04 09:06:36 +0200
committerMinteck <contact@minteck.org>2022-06-04 09:06:36 +0200
commit90db3a8698d385f9ac2086d238cd58de20d153ba (patch)
treedf6824b753a2d189a738cbb483165117c19c775e /index.js
parentb22f6770c8bd084d66950655203c61dd701b3d90 (diff)
downloadequestriadb-90db3a8698d385f9ac2086d238cd58de20d153ba.tar.gz
equestriadb-90db3a8698d385f9ac2086d238cd58de20d153ba.tar.bz2
equestriadb-90db3a8698d385f9ac2086d238cd58de20d153ba.zip
It's working?
Diffstat (limited to 'index.js')
-rw-r--r--index.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/index.js b/index.js
index 99a319f..566796d 100644
--- a/index.js
+++ b/index.js
@@ -48,6 +48,14 @@ console.log("Starting server...");
let server = http.createServer(function (req, res) {
try {
+ if (req.headers["x-equestriadb-token"]) {
+ req.headers["x-pawerdb-token"] = req.headers["x-equestriadb-token"];
+ }
+
+ if (req.headers["x-eqdb-token"]) {
+ req.headers["x-pawerdb-token"] = req.headers["x-eqdb-token"];
+ }
+
parts = req.url.split("/").filter(i => i.trim() !== "");
console.log(req.socket.address(), parts);
@@ -98,4 +106,4 @@ let server = http.createServer(function (req, res) {
server.listen(4459);
-console.log("pawerDB listening on port 4459") \ No newline at end of file
+console.log("EquestriaDB listening on port 4459") \ No newline at end of file