# `Countersign.Web.DocumentController`
[🔗](https://github.com/mkreyman/countersign/blob/v0.1.0/lib/countersign/web/document_controller.ex#L1)

The signer's PDFs, behind `Countersign.Web.Admit`:

  * `document` (`<sign_path>/:token/document`, admitted for signing): the
    subject as it will be signed, checked first by
    `Countersign.Requests.review/2` (a changed subject supersedes the
    request and answers 410), rendered by
    `c:Countersign.Signable.render_pdf/2` for `:review`. Inline, or as an
    attachment with `?download=1`.
  * `copy` (`<sign_path>/:token/copy`, admitted for the copy): the signed
    subject rendered now, for `:copy`, as an attachment.

Every answer carries `Cache-Control: no-store`, and nothing is cached on
either side: each request renders, and each render is reported to the
host as a `:view` audit with `%{purpose: :review | :copy}`. A renderer that is saturated
(`{:error, :busy}`) answers 503 with "try again". The document's
`frame-ancestors 'self'` lets the signing page frame it under a host CSP
that forbids framing elsewhere.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
