Add better logging/Other stuff #3

Merged
ChrisChrome merged 6 commits from dev into main 2026-02-18 13:46:00 -07:00
Showing only changes of commit 56f46086ff - Show all commits

View file

@ -1043,7 +1043,7 @@ const logCall = (caller, callee, srcIp) => {
} }
const genCall = (req, res, apiKey, ani, number) => { const genCall = (req, res, apiKey, ani, number) => {
const srcIp = process.env.PROXY_HEADER ? req.headers[process.env.PROXY_HEADER] : req.remoteAddress; const srcIp = process.env.PROXY_HEADER ? req.headers[process.env.PROXY_HEADER] : req.ip;
pool.getConnection().then(conn => { pool.getConnection().then(conn => {
//conn.query("SELECT * FROM routes WHERE apiKey = ? AND block_start <= ? AND block_start + block_length >= ?", [apiKey, ani, ani]).then((rows) => { //conn.query("SELECT * FROM routes WHERE apiKey = ? AND block_start <= ? AND block_start + block_length >= ?", [apiKey, ani, ani]).then((rows) => {
conn.query("SELECT * FROM routes WHERE apiKey = ?", [apiKey]).then((rows) => { // We'll try this Nick, if it doesn't work we'll go back to the original conn.query("SELECT * FROM routes WHERE apiKey = ?", [apiKey]).then((rows) => { // We'll try this Nick, if it doesn't work we'll go back to the original