billflare.

Feng Yi: CORS preflight can also burn the free allowance; uncached OPTIONS add one extra Worker invocation before every real request

On 2026-11-13, X user @Michael_liyang (Feng Yi) wrote that cross-origin preflight also burns the free allowance. The browser sends an OPTIONS preflight before each cross-origin request; if it is not cached, that is one extra Worker invocation before every real request, and under volume this is what hits the wall first. The author’s approach: add Max-Age on the preflight response to lengthen the cache, allow only fixed origins and methods, and do not use wildcards. The path is request → preflight cache lookup → return on hit → enter the Worker only on a miss.

Products
Workers
Source
Author experience𝕏 post
Author
风易 (@Michael_liyang)

Key points

  • This is a new CORS preflight tutorial by the same author, not merged into the Cron keep-alive or other free-tier allowance guides.

Original sources

  1. Published

    Original post

    Read on 𝕏

    On 2026-11-13, X user @Michael_liyang (Feng Yi) wrote that cross-origin preflight also burns the free allowance. The browser sends an OPTIONS preflight before each cross-origin request; if it is not cached, that is one extra Worker invocation before every real request, and under volume this is what hits the wall first. The author’s approach: add Max-Age on the preflight response to lengthen the cache, allow only fixed origins and methods, and do not use wildcards. The path is request → preflight cache lookup → return on hit → enter the Worker only on a miss.

    风易 | AI 工具链

    @Michael_liyang · Original 𝕏 post

    先说结论:跨域请求的预检也在烧免费额度。浏览器每次跨域先发一次 OPTIONS 预检,不缓存就是每次真实请求前多一次 Worker 调用,量一上来先撞墙的是它。做法:预检响应加 Max-Age 拉长缓存、只放行固定域名和方法,别放通配符。链路:请求→预检查缓存→命中直接返→未命中才进 Worker。
Community resourceWorkers +1

AetherGate: a self-hosted OpenAI-compatible gateway on Workers with per-member RPM, TPM and monthly budgets

haiying-ai/aethergate-ai-gateway is an MIT-licensed self-hosted OpenAI-compatible gateway that runs on Cloudflare Workers and D1. It routes one public model name to several upstream providers, issues hashed per-member sk- keys, and enforces RPM, TPM, concurrency and monthly budget policies, with a usage ledger and audit logs. This is an upstream-key control plane, not a substitute for Cloudflare’s own AI Gateway spend limits or account Spend Management.

Durable Objects

neoblender13: an AI agent’s recursive alarm system turned a ~$10 monthly Cloudflare bill into $1,500; $400 credited.

neoblender13 says the Cloudflare bill is normally around $10 a month, but this month it was hit with a $1,500 bill because an AI agent created a recursive alarm system that ballooned Durable Objects storage writes, and that Cloudflare support was not very helpful. In later replies the author says they did not realize spending limits were alert only, received a $400 credit and still had to pay $1,100, that the single alert email got buried in the inbox, and that a Discord bot now reports costs every 12 hours.

Author experienceD1 +4

qianshuixia2026: D1 free row-read cap burned twice in one day, plus R2 and Workers pitfalls after the first paid orders

浅水虾 (@qianshuixia2026) published a 16 November 2026 X article after the first $12 and $29 orders. On 14 November a 10-minute cron full-table scan burned the D1 Free 5 million daily row-read cap in 2 hours 14 minutes; the same evening the author ran wrangler d1 execute --remote statistics that scanned about 4.08 million rows in 5 minutes and hit the cap again, then paid $5 to upgrade to Workers Paid. The article also covers an R2 multipart complete() customMetadata mismatch that failed a >24 MB export five times (50 credits sent as apology), 128 MB / 10 ms / 50-subrequest walls that a paid plan does not lift, and Queues’ 10,000 daily operations with three operations per delivered message.