Guides#

Practical, copy‑paste friendly walkthroughs that show how to use Webrick’s features in real apps. Each guide mirrors the actual code paths and middleware interactions.

What’s inside#

  • Signed & Temporary URLs — Generate secure links and verify them via middleware.

  • Attribute Routes — Co‑locate route metadata with your handlers using PHP attributes.

  • Responses & Negotiation — Let Webrick pick the right Content-Type, stream data, and cooperate with ETags/compression.

When to use guides vs reference#

Use Guides when you want end‑to‑end, working examples. Use Reference when you need API shape, options, or deep behavior notes.

Common pitfalls#

  • Double compression: enable either Webrick compression or proxy gzip/deflate/zstd, not both.

  • Missing WEBRICK_SIGN_KEY: signed URL helpers will fail without a key.

  • Attribute discovery: ensure your scan paths are correct and classes are autoloadable.