This commit is contained in:
2025-02-18 08:31:38 +08:00
parent b6a71aa49b
commit cf1cc83547
12 changed files with 104 additions and 52 deletions

View File

@@ -10,7 +10,9 @@ module.exports = {
if(req.headers.hasOwnProperty("data")) {
try {
req.headers.data = rsa.PrivateKeyDecryption(req.headers.data)
if(req.url == config.filter.login || req.url == config.filter.add) {
if(req.url == config.filter.login || req.url == config.filter.add
|| req.url == config.filter.home
) {
next()
} else {
if(req.headers.hasOwnProperty("token")) {
@@ -32,6 +34,11 @@ module.exports = {
}
}
} catch (e) {
console.log("--------");
console.log("e --------: ", e);
console.log("--------");
res.json({
status: 500,
message: '抱歉,公钥加密有误,请检查公钥'