EraCode practice

Cloudflare practice challenges

Public Cloudflare challenges shared by the EraCode community. These pages are teasers — skill maintenance starts when you attempt the full problem inside EraCode.

CSP for inline styles: add a nonce to your Cloudflare Worker HTML response

intermediatecodingCloudflare

Return an HTML page from a **Cloudflare Worker** where a `<style>` tag is allowed by CSP without using `unsafe-inline`. - Generate a per-request nonce and apply it to the `<style>` tag. - Set a `Content-Security-Policy` header that allows only that nonce for `style-src`. - Keep everything else simple (just return the HTML + headers).

Durable Object: Maintain a unique visitor set per day

intermediatecodingCloudflare

Implement **one data-structure update** in a Cloudflare **Durable Object**. - Store a **set of unique visitor IDs** for a given day in Durable Object storage. - When a visitor ID is recorded, it should be added only once (idempotent). - Return the updated **unique count** for that day.

Other technologies

All challengesCDjangoDjango REST FrameworkDockerExpressFlaskGitJavaScriptLIBORNext.jsPostgreSQLPythonRSQLSequelizeSushiswapTailwind CSSThird-party APIsTypeScriptZod

Product

  • Home
  • Features
  • Daily challenges
  • Pricing

Guides

  • Topics
  • Practice
  • Glossary
  • Prevent skill atrophy
  • Stay sharp with AI coding
  • Daily coding practice

Teams

  • Senior developers
  • Engineering team training

Legal

  • Privacy
  • Contact