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 {
|
||||
|
||||
@@ -9,22 +9,33 @@ export function Footer() {
|
||||
<footer className="mt-16 py-8 border-t border-gray-200 dark:border-dark-600">
|
||||
<div className="max-w-4xl mx-auto px-4">
|
||||
<div className="flex flex-col sm:flex-row items-center justify-between gap-4">
|
||||
{/* Left - Spanish flag and tagline */}
|
||||
<div className="flex items-center space-x-3">
|
||||
<Link to="/" className="flex items-center space-x-2 group">
|
||||
<svg
|
||||
className="w-5 h-3.5"
|
||||
viewBox="0 0 22 16"
|
||||
fill="none"
|
||||
aria-label="Bandera española"
|
||||
>
|
||||
<rect width="22" height="16" fill="#c60b1e" />
|
||||
<rect y="4" width="22" height="8" fill="#f1bf00" />
|
||||
</svg>
|
||||
<span className="text-gray-500 dark:text-slate-400 text-xs group-hover:text-teal-500 dark:group-hover:text-teal-400 transition-colors">
|
||||
{t('footer.tagline')}
|
||||
</span>
|
||||
</Link>
|
||||
{/* Left - EU flag and tagline */}
|
||||
<div className="flex items-center space-x-2">
|
||||
<svg
|
||||
className="w-5 h-3.5 flex-shrink-0"
|
||||
viewBox="0 0 22 16"
|
||||
fill="none"
|
||||
aria-label="Bandera de la Unión Europea"
|
||||
>
|
||||
<rect width="22" height="16" fill="#003399" />
|
||||
<g fill="#FFCC00">
|
||||
<polygon transform="translate(11,4)" points="0,-0.85 0.2,-0.275 0.808,-0.263 0.323,0.105 0.5,0.688 0,0.34 -0.5,0.688 -0.323,0.105 -0.808,-0.263 -0.2,-0.275" />
|
||||
<polygon transform="translate(13,4.54)" points="0,-0.85 0.2,-0.275 0.808,-0.263 0.323,0.105 0.5,0.688 0,0.34 -0.5,0.688 -0.323,0.105 -0.808,-0.263 -0.2,-0.275" />
|
||||
<polygon transform="translate(14.46,6)" points="0,-0.85 0.2,-0.275 0.808,-0.263 0.323,0.105 0.5,0.688 0,0.34 -0.5,0.688 -0.323,0.105 -0.808,-0.263 -0.2,-0.275" />
|
||||
<polygon transform="translate(15,8)" points="0,-0.85 0.2,-0.275 0.808,-0.263 0.323,0.105 0.5,0.688 0,0.34 -0.5,0.688 -0.323,0.105 -0.808,-0.263 -0.2,-0.275" />
|
||||
<polygon transform="translate(14.46,10)" points="0,-0.85 0.2,-0.275 0.808,-0.263 0.323,0.105 0.5,0.688 0,0.34 -0.5,0.688 -0.323,0.105 -0.808,-0.263 -0.2,-0.275" />
|
||||
<polygon transform="translate(13,11.46)" points="0,-0.85 0.2,-0.275 0.808,-0.263 0.323,0.105 0.5,0.688 0,0.34 -0.5,0.688 -0.323,0.105 -0.808,-0.263 -0.2,-0.275" />
|
||||
<polygon transform="translate(11,12)" points="0,-0.85 0.2,-0.275 0.808,-0.263 0.323,0.105 0.5,0.688 0,0.34 -0.5,0.688 -0.323,0.105 -0.808,-0.263 -0.2,-0.275" />
|
||||
<polygon transform="translate(9,11.46)" points="0,-0.85 0.2,-0.275 0.808,-0.263 0.323,0.105 0.5,0.688 0,0.34 -0.5,0.688 -0.323,0.105 -0.808,-0.263 -0.2,-0.275" />
|
||||
<polygon transform="translate(7.54,10)" points="0,-0.85 0.2,-0.275 0.808,-0.263 0.323,0.105 0.5,0.688 0,0.34 -0.5,0.688 -0.323,0.105 -0.808,-0.263 -0.2,-0.275" />
|
||||
<polygon transform="translate(7,8)" points="0,-0.85 0.2,-0.275 0.808,-0.263 0.323,0.105 0.5,0.688 0,0.34 -0.5,0.688 -0.323,0.105 -0.808,-0.263 -0.2,-0.275" />
|
||||
<polygon transform="translate(7.54,6)" points="0,-0.85 0.2,-0.275 0.808,-0.263 0.323,0.105 0.5,0.688 0,0.34 -0.5,0.688 -0.323,0.105 -0.808,-0.263 -0.2,-0.275" />
|
||||
<polygon transform="translate(9,4.54)" points="0,-0.85 0.2,-0.275 0.808,-0.263 0.323,0.105 0.5,0.688 0,0.34 -0.5,0.688 -0.323,0.105 -0.808,-0.263 -0.2,-0.275" />
|
||||
</g>
|
||||
</svg>
|
||||
<span className="text-gray-500 dark:text-slate-400 text-xs">
|
||||
Comparte secretos y archivos de forma efímera y segura
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* Right - Links, sponsorship, theme */}
|
||||
@@ -53,7 +64,7 @@ export function Footer() {
|
||||
rel="noopener noreferrer"
|
||||
className="text-gray-500 dark:text-slate-400 hover:text-teal-500 dark:hover:text-teal-400 text-xs transition-colors"
|
||||
>
|
||||
{t('footer.sponsored_by')}
|
||||
Servicio ofrecido por Cloud Host
|
||||
</a>
|
||||
<div className="flex items-center space-x-2 pl-2 border-l border-gray-300 dark:border-dark-500">
|
||||
<LanguagePicker />
|
||||
|
||||
Reference in New Issue
Block a user