Skip to content

docs(v3): sync with the latest v3 changes on master - #22

Draft
joseluisq wants to merge 1 commit into
masterfrom
docs/v3-sync-master
Draft

joseluisq wants to merge 1 commit into
masterfrom
docs/v3-sync-master

Conversation

@joseluisq

Copy link
Copy Markdown
Contributor

Syncs the v3 docs with static-web-server master (v3.0.0-beta.2 plus unreleased changes up to static-web-server/static-web-server#804). It covers what earlier docs PRs (#15–#21) did not.

Changes

New defaults (static-web-server/static-web-server#733, #804)

  • Port 8080, root . and HTTPS redirect port 8080 across the CLI, env, TOML, defaults, quick start and examples. Docker tags bumped to 3.0.0-beta.2.
  • The default :: host accepts IPv6 and IPv4 (dual-stack).

Features not yet documented

  • New page: Open in Browser (--open, --open-path, #747), added to the sidebar and the features index.
  • --directory-listing-format=auto, which negotiates the format with the Accept header and adds Vary: Accept (#738).

Behavior changes from recent fixes

  • Logging: new Trusted proxies section. An empty --trusted-proxies now trusts no one, IPv4-mapped addresses match, and proxy headers are never logged over a UDS.
  • Metrics: label values are bounded (GET/HEAD/OPTIONS/other, and the virtual-host name or other). /metrics and health probes are not counted (#792).
  • Health: /readyz returns 503 while the root directory is missing (#793).
  • Basic auth: only CORS preflights skip authentication.
  • Markdown negotiation: Vary: Accept on HTML and markdown responses (#789, #798).
  • Compression: documents when responses are not compressed (< 200 bytes, 206, no content), the q=0 handling and HEAD parity. Pre-compression page: it is enabled by default (the page said disabled), and .gz is served only for gzip.
  • Follow symlinks: the checks apply to the file actually served (pre-compressed variant, index file, .html sibling).
  • Memory cache: variants are cached per content coding, and only GET/HEAD use the cache.

Configuration reference

  • CLI help text synced with cli.rs. A script checked every description and default against upstream.
  • TOML manifest rebuilt with every current [general] key and default. It used to show v2 keys such as http2-tls-cert, plus port 80 and root ./public. Added a status/scope header example.
  • unix-socket-mode TOML examples now use 0o660: a bare 660 is read as decimal.

Migration guide

  • Corrected port and root (8080, .) and the security-headers/HSTS wording.
  • New items: trusted proxies, the 16 KiB header limit, Cache-Control for HTML, the fallback page keeping 404 for assets, and dual-stack binding.

Links

  • Fixed 52 env#server_* links that never resolved: VitePress slugs these headings with hyphens (#server-health).

Checks

  • yarn format:check (markdownlint + prettier) passes.
  • yarn docs:build passes, and all new and fixed anchors are present in the built HTML.

Notes for review

  • The help text was synced from source, not captured from a built binary, so a quick static-web-server -h comparison is worth doing.
  • Upstream's --cors-expose-headers help still says it requires --cors-expose-origins (should be --cors-allow-origins). The docs keep the help output verbatim.
  • Upstream concern, not a docs issue: since the root default changed to ., no Dockerfile sets SERVER_ROOT. The images may serve their working directory (/home/sws, or / for scratch) rather than /public. The Docker page still describes /public.

🤖 Generated with Claude Code

Bring the v3 docs in line with static-web-server master (v3.0.0-beta.2
plus unreleased changes):

- New defaults: port 8080, root `.`, HTTPS redirect port 8080, and the
  dual-stack `::` host
- Document `--open`/`--open-path` and `--directory-listing-format=auto`
- Trusted proxies trust no one by default; metrics labels are bounded
  and exclude probes; `/readyz` fails while the root is missing
- Basic auth only skips CORS preflights; `Vary: Accept` for markdown
  negotiation; when compression is skipped; pre-compression is on by
  default; symlink checks apply to the file actually served
- Rebuild the TOML manifest with every current key and default
- Extend the migration guide with the missing breaking changes
- Fix the `env#server_*` anchors, which never matched VitePress slugs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
static-web-server-docs 316da6d Commit Preview URL

Branch Preview URL
Nov 09 2026, 01:15 AM

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant