graceful shutdown and rate limit implementation

This commit is contained in:
2026-07-17 14:23:52 +02:00
parent 06b16b9033
commit 80b73b62e4
4 changed files with 62 additions and 7 deletions
-3
View File
@@ -21,9 +21,6 @@ router.get('/badge', async (req, res) => {
const safeIcon = escapeSvg(icon);
const iconUrl = `https://cdn.simpleicons.org/${safeIcon}?viewbox=auto&size=${size}`;
const iconResponse = await axios.get(iconUrl, { responseType: 'text' });
if (iconResponse.status !== 200) {
return res.status(404).send('Icon not found');
}
const iconSVG = iconResponse.data;
// if there is no label query, use the title from the SVG