2 min read
A Content Security Policy for a mostly static Next.js site
Nonces are the textbook answer for inline scripts, and they don't fit pre-rendered pages. What this site's policy allows, what it still blocks, and the bug it surfaced on the way.
I build fast, secure and maintainable things for the web — mostly PHP and WordPress, React and Next.js, and Node. Co-founder of required, on the web since 2004.
2 min read
Nonces are the textbook answer for inline scripts, and they don't fit pre-rendered pages. What this site's policy allows, what it still blocks, and the bug it surfaced on the way.
2 min read
App, database, file storage and a cron job, all moved to one platform in two days. What changed on the way, and what I'd do the same way again.
2 min read
Rate limiting by IP sounds simple until you ask where the IP comes from. Why the first X-Forwarded-For entry is whatever the client wants it to be.