Remove api keys on these endpoints for now

This commit is contained in:
austinkelsay 2024-11-08 14:34:56 -06:00
parent 38f15bb861
commit 0044a72a00
No known key found for this signature in database
GPG Key ID: 44CB4EC6D9F2FA02
2 changed files with 9 additions and 8 deletions

View File

@ -7,13 +7,14 @@ import appConfig from '@/config/appConfig';
const ZAP_PRIVKEY = process.env.ZAP_PRIVKEY; const ZAP_PRIVKEY = process.env.ZAP_PRIVKEY;
const PLEBDEVS_API_KEY = process.env.PLEBDEVS_API_KEY; const PLEBDEVS_API_KEY = process.env.PLEBDEVS_API_KEY;
// todo use cron secret????
export default async function handler(req, res) { export default async function handler(req, res) {
// Verify API key // Verify API key
const apiKey = req.headers['authorization']; // const apiKey = req.headers['authorization'];
if (!apiKey || apiKey !== PLEBDEVS_API_KEY) { // if (!apiKey || apiKey !== PLEBDEVS_API_KEY) {
res.status(401).json({ error: 'Unauthorized' }); // res.status(401).json({ error: 'Unauthorized' });
return; // return;
} // }
try { try {
// Add execution time limit protection // Add execution time limit protection

View File

@ -6,9 +6,9 @@ const lnAddress = process.env.LIGHTNING_ADDRESS;
const amount = 25; // Set the subscription amount in satoshis const amount = 25; // Set the subscription amount in satoshis
export default async function handler(req, res) { export default async function handler(req, res) {
if (req.headers.authorization !== process.env.CRON_SECRET) { // if (req.headers.authorization !== process.env.CRON_SECRET) {
return res.status(401).json({ error: 'Unauthorized' }); // return res.status(401).json({ error: 'Unauthorized' });
} // }
if (req.method === 'GET') { if (req.method === 'GET') {
try { try {