💡(backend) warm about the token nature of Yprovider microservice

Note to the future myself, using a raw token format is
not common. It should be refactor
This commit is contained in:
lebaudantoine
2024-12-15 18:52:37 +01:00
committed by aleb_the_flash
parent c10808b611
commit 8eb986591a
3 changed files with 3 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ export const httpSecurity = (
}
// Secret API Key check
// Note: Changing this header to Bearer token format will break backend compatibility with this microservice.
const apiKey = req.headers['authorization'];
if (apiKey !== COLLABORATION_SERVER_SECRET) {
res.status(403).json({ error: 'Forbidden: Invalid API Key' });