fix: silence analytics 403 toast and update footer
- analytics/track: return 200 instead of 403 when disabled or bot detected — prevents the global API error handler from firing an "Unknown Error" toast on every dashboard page load - Footer: replace ES flag with EU flag (12-star SVG polygon), remove paste.es link wrapper, hardcode tagline in Spanish, replace sponsor text with "Servicio ofrecido por Cloud Host" Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -26,13 +26,13 @@ const timeRangeSchema = z.object({
|
||||
// POST /api/analytics/track - Public endpoint for visitor tracking
|
||||
app.post('/track', zValidator('json', trackSchema), async (c) => {
|
||||
if (!isAnalyticsEnabled()) {
|
||||
return c.json({ success: false }, 403);
|
||||
return c.json({ success: false }, 200);
|
||||
}
|
||||
|
||||
const userAgent = c.req.header('user-agent') || '';
|
||||
|
||||
if (isbot(userAgent)) {
|
||||
return c.json({ success: false }, 403);
|
||||
return c.json({ success: false }, 200);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user