From 2ea873e6bd538348bca743616e48b0f547b4122c Mon Sep 17 00:00:00 2001 From: David Arranz Date: Thu, 20 Feb 2025 11:11:41 +0100 Subject: [PATCH] =?UTF-8?q?Activada=20API=20KEY=20para=20producci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/environments/development.js | 2 ++ config/environments/production.js | 2 ++ helpers/security.helper.js | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/environments/development.js b/config/environments/development.js index 2872983..09f65ca 100644 --- a/config/environments/development.js +++ b/config/environments/development.js @@ -24,6 +24,8 @@ module.exports = { hostname: process.env.HOSTNAME || "127.0.0.1", port: process.env.PORT || 19999, public_url: "", + api_key: + "AKlqdviapp-xcCJs5BfYCzHSIWKpLL1JY5Ypl3HCKHNKhXhAHVYGb2uL9YMJzNprKaTLCzcGcVUQgN6RBh3taBlnaxAhv1pQdmzyxmtAIIBzxYvVy8OusNQmRrsv95tf", }, cdn: { diff --git a/config/environments/production.js b/config/environments/production.js index 1cc576a..29724be 100644 --- a/config/environments/production.js +++ b/config/environments/production.js @@ -32,6 +32,8 @@ module.exports = { hostname: process.env.HOSTNAME || "127.0.0.1", port: process.env.PORT || 19999, public_url: "https://apiapp3.loquedeverdadimporta.org/api/v3", + api_key: + "APlqdviapp-5CBZrycv33HbB1MfXHrBxsKZRQ17q8zcE4nCi4uDYQTnkdMDfuxTqJrgIz9AHvsJbK45sZ91fvvo3dfsB0mc1sliT955oSr025uU7ZpBtxt2fwzp9DJAs", }, cdn: { diff --git a/helpers/security.helper.js b/helpers/security.helper.js index f8c8fb4..c03d67c 100644 --- a/helpers/security.helper.js +++ b/helpers/security.helper.js @@ -116,7 +116,7 @@ module.exports = { }, verify: (tokenOrKey) => { - if (tokenOrKey === 'AKlqdviapp-xcCJs5BfYCzHSIWKpLL1JY5Ypl3HCKHNKhXhAHVYGb2uL9YMJzNprKaTLCzcGcVUQgN6RBh3taBlnaxAhv1pQdmzyxmtAIIBzxYvVy8OusNQmRrsv95tf') { + if (tokenOrKey === config.server.api_key) { return true; } else { return _verify(tokenOrKey, signOptions);