mirror of
https://github.com/juherr/kill-the-news.git
synced 2026-06-20 22:03:48 +00:00
feat: landing page install guide, demo banner, WAF docs, nightly demo reset
- docs/index.html: nav links (Features/How it works/Install), hero CTAs (Try demo primary, Self-host, GitHub), demo banner with credentials, full 7-step installation section with WAF rate limiting guide (dashboard + Terraform) integrated as step 7 - wrangler-example.toml: cron trigger on demo env for nightly KV reset at 03:00 UTC - src/index.ts: scheduled handler that wipes all EMAIL_STORAGE KV keys - TODO.md: mark WAF rate limiting as done Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -175,4 +175,17 @@ export default {
|
||||
) {
|
||||
await handleCloudflareEmail(message, env, ctx);
|
||||
},
|
||||
async scheduled(_event: ScheduledEvent, env: Env, _ctx: ExecutionContext) {
|
||||
let cursor: string | undefined;
|
||||
let deleted = 0;
|
||||
do {
|
||||
const result = await env.EMAIL_STORAGE.list({ cursor });
|
||||
await Promise.all(
|
||||
result.keys.map(({ name }) => env.EMAIL_STORAGE.delete(name)),
|
||||
);
|
||||
deleted += result.keys.length;
|
||||
cursor = result.list_complete ? undefined : result.cursor;
|
||||
} while (cursor);
|
||||
logger.info("Demo KV reset complete", { deleted });
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user