diff --git a/index.js b/index.js index 8983189..77e3080 100644 --- a/index.js +++ b/index.js @@ -6,6 +6,7 @@ const http = require('http'); const port = env.PORT || "3000" const address = env.ADDRESS || "0.0.0.0" const key = env.KEY +const nokey = env.USE_KEY || "false" let tokens = {}; @@ -49,6 +50,12 @@ const server = http.Server(async (req, res) => { visitorData: tokens.visitorData, }; + if (nokey) { + res.writeHead(200, { 'Content-Type': 'application/json' }); + res.write(JSON.stringify(json)); + return res.end(); + } + if (host === `127.0.0.1:${port}` || host === `localhost:${port}`) { res.writeHead(200, { 'Content-Type': 'application/json' }); res.write(JSON.stringify(json));