aa
This commit is contained in:
@@ -26,7 +26,7 @@ app.use((req, res, next) => {
|
||||
console.log('Middleware per verificare l\'API Key...')
|
||||
const apiKey = req.headers['x-api-key'];
|
||||
if (apiKey !== API_KEY) {
|
||||
console.error('APIKEY NON CORRETTA !')
|
||||
console.error('APIKEY NON CORRETTA !', API_KEY, apiKey);
|
||||
return res.status(403).json({ error: 'Accesso negato' });
|
||||
}
|
||||
next();
|
||||
|
||||
Reference in New Issue
Block a user