aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2021-04-23 00:44:23 -0400
committerAdam Soltys <[email protected]>2021-04-27 18:07:15 -0400
commit20273701d1cf75ef7540ba2e7b90554c0b17c41c (patch)
tree3543e736c52a6d39253c5f3e1266abe565477e0e
parent2621fec1c189b6de5e3bd2b86b391443ccd7a8a7 (diff)
downloadcoinos-server-20273701d1cf75ef7540ba2e7b90554c0b17c41c.tar.gz
coinos-server-20273701d1cf75ef7540ba2e7b90554c0b17c41c.zip
change cors setting
-rw-r--r--index.js2
-rw-r--r--package.json2
-rw-r--r--routes/payments.js2
-rw-r--r--routes/users.js3
4 files changed, 4 insertions, 5 deletions
diff --git a/index.js b/index.js
index ef30244d..70b9564c 100644
--- a/index.js
+++ b/index.js
@@ -52,7 +52,7 @@ app.use((err, req, res, next) => {
return res.end();
});
app.use(cookieParser());
-// app.use(cors({ credentials: true, origin: "http://*:*" }));
+app.use(cors({ credentials: true, origin: "https://coinos.io" }));
app.use(compression());
server = require("http").Server(app);
diff --git a/package.json b/package.json
index cb568e53..73b43918 100644
--- a/package.json
+++ b/package.json
@@ -61,7 +61,7 @@
"devDependencies": {
"nodemon": "^2.0.2",
"pino-pretty": "^3.6.1",
- "pm2": "^4.4.1",
+ "pm2": "^4.5.6",
"prettier": "^1.18.2"
}
}
diff --git a/routes/payments.js b/routes/payments.js
index e8c82853..00eb1bb2 100644
--- a/routes/payments.js
+++ b/routes/payments.js
@@ -68,7 +68,7 @@ ah(async () => {
tx =>
tx.category === "receive" &&
tx.confirmations > 0 &&
- unconfirmed.includes(tx.address)
+ unconfirmed.includes(tx.txid)
)
.map(tx => {
l.warn("tx unconfirmed in db", tx.txid, tx.address);
diff --git a/routes/users.js b/routes/users.js
index d6dc68a7..47964887 100644
--- a/routes/users.js
+++ b/routes/users.js
@@ -337,8 +337,7 @@ app.post(
) {
l.warn(
"invalid username or password attempt",
- req.body.username,
- req.body.password
+ req.body.username
);
return res.status(401).end();
}