Search the archive

14,355 indexed articles, 13,283 of them summarised by us.

Articles
14,355
Research papers
91,965
Models priced
2,249
Providers
163

2 results for “MDN”

Newest and most relevant first

Define HTTP security headers once, apply them across Python web apps

Python developers can now manage security headers through one dependency-free library instead of scattering configuration across middleware and handlers.

A free, open-source Python library called 'secure' helps web developers keep their websites safer with less hassle. Websites use hidden labels, called HTTP security headers, that tell browsers to block attacks like clickjacking. Usually developers sprinkle these settings across many code files, so it's easy to miss one. This tool stores all the settings in one place and applies them across popular Python frameworks, offering ready-made presets named BASIC, BALANCED, and STRICT.

Teams maintaining multiple Python web services often lose track of which layer sets which security header, creating audit and risk blind spots. The open-source 'secure' library consolidates that configuration into a single policy object applied via ASGI or WSGI middleware. It has zero dependencies, reducing audit surface, and its defaults follow MDN and OWASP guidance. The trade-off: presets still need per-application review, especially Content Security Policy.

The 'secure' library (github.com/typeerror/secure) exposes a single Secure policy object applied through ASGI middleware, WSGI middleware, or response hooks, with both set_headers and set_headers_async methods. Secure.with_default_headers() yields a BALANCED preset covering COOP, CORP, CSP, HSTS, Permissions-Policy, Referrer-Policy, X-Content-Type-Options and X-Frame-Options; Preset.BASIC and Preset.STRICT are also available. Duplicate handling, overwrites, and validation are explicit, and the dependency count is zero. The README warns defaults are a starting point, not a substitute for application-specific review.

GitHub Opensource Projects →

simonw/browser-compat-db

Browser compatibility data is now a single downloadable 66MB SQLite file with open CORS headers, so developers and AI tools can query it directly instead of scraping MDN.

Mozilla's MDN publishes a large dataset showing which web features work in which browsers. Simon Willison converted that dataset into a single database file, about 66MB, that anyone can download. He used AI coding tools to write both the conversion script and the automation that publishes it. Web developers building sites that must work across browsers can now query this data directly.

Willison released browser-compat-db, turning Mozilla's browser compatibility data into a ~66MB SQLite file hosted on GitHub's CDN with open CORS headers. Notably, two different AI tools did the work: a Claude Code-generated Python script built the database using sqlite-utils, and Codex Desktop (GPT-5.5) wrote the GitHub Actions workflow that publishes it. The project also demonstrates a practical workaround: GitHub releases lack CORS headers, so the file lives on an orphan 'db' branch instead.

Inspired by MDN's new MCP server, Willison converted mdn/browser-compat-data into a ~66MB SQLite database. A build_db.py script, generated by Claude Code for web using Opus 4.8, performs the conversion with sqlite-utils. Because GitHub releases lack CORS headers, a GitHub Actions workflow built by Codex Desktop (GPT-5.5) force-pushes the database to an orphan 'db' branch, where regular repo files get open CORS headers. The result is downloadable and explorable via Datasette Lite.

Simon Willison’s Weblog →