ES

@core / antispam

1.1.0 ▾
verificadoMIT
GitHub

Protección antispam para formularios públicos: honeypot, tiempo firmado, Turnstile o hCaptcha y rate limit en Postgres

Código9 archivosContexto~722 tokensescaneo superado

El árbol exacto que se inyectará, tras aplicar .genpmignore. Anclado a

src/lib/antispam/schema.tssolo lectura · 0328b98
// Tablas de @core/antispam. Las recoge drizzle-kit vía src/lib/db/drizzle.config.ts.
import { index, integer, pgTable, text, timestamp } from 'drizzle-orm/pg-core';

/** Ventanas fijas de límite de frecuencia. `key` es un hash: nunca se guarda la IP ni el email en claro. */
export const rateLimits = pgTable(
  'rate_limits',
  {
    key: text('key').primaryKey(),
    windowStart: timestamp('window_start', { withTimezone: true, mode: 'date' }).notNull(),
    count: integer('count').notNull(),
    expiresAt: timestamp('expires_at', { withTimezone: true, mode: 'date' }).notNull(),
  },
  (t) => [index('rate_limits_expires_idx').on(t.expiresAt)],
);

Reportar @core/antispam

Inicia sesión con GitHub para reportar un paquete.