Rendering
Remote resources
How images, stylesheets and fonts referenced by a document are fetched.
Revecto fetches the remote resources a document references and inlines them before rendering. The renderer itself fetches nothing.
Documents are untrusted input: Revecto fetches their resources itself, under fixed limits, so the renderer cannot reach internal networks and renders stay deterministic.
What is fetched
| Reference | Fetched |
|---|---|
<img src> | Yes. srcset and <picture> sources are dropped in favor of src. |
<link rel="stylesheet"> | Yes. |
@import | One level deep. |
CSS url(), including @font-face sources | Yes. Forme fetches only fonts from CSS. |
- Relative URLs resolve against
<base href>. - Google Fonts stylesheets are served as TrueType, so they work with Forme.
Limits
| Limit | Value |
|---|---|
| Schemes | http and https, on the default port only |
| Redirects | At most 3 |
| Time per resource | 5 s |
| Total fetch time | 10 s |
| Resources per render | At most 30 |
| Inlined data per render | 12 MiB, template assets included |
| Fetched font size | 2 MiB |
Refused targets
- IP-address hosts.
- Hosts under
revecto.dev,revecto.appandworkers.dev. - Any port other than the scheme's default.
Revecto has no fixed egress IP, so you cannot allowlist it by IP address. Serve resources from a public URL, or inline them as data: URIs.
Removed before rendering
<meta http-equiv="refresh"><link rel="preconnect">and<link rel="dns-prefetch"><noscript>with its content
Skipped resources
A resource that cannot be fetched is left out and the PDF is still produced. The response lists it, and so does a 422 refusal:
| Header | Content |
|---|---|
X-Skipped-Resources | Number of resources left out. Absent when none was. |
X-Skipped-Resources-Detail | Up to ten space-separated <reason>=<url> pairs; the URL has no query string or fragment. Absent when nothing was skipped. |
X-Skipped-Resources: 2
X-Skipped-Resources-Detail: timeout=https://example.com/logo.png font_format=https://example.com/font.woff2| Reason | Meaning |
|---|---|
scheme | Not http or https. |
ip_literal | The host is an IP address. |
port | Not the scheme's default port. |
denied_host | The host is refused. |
relative_url | The URL is relative and could not be resolved. |
redirect_limit | More than 3 redirects. |
timeout | The resource took more than 5 s. |
budget_time | The 10 s total fetch time was spent. |
budget_bytes | The 12 MiB inlined-data budget was spent. |
count | More than 30 resources. |
import_depth | An @import more than one level deep. |
status_<code> | The server answered with this HTTP status. |
unsupported_type | The resource's type is not supported. |
font_format | The font's format is not supported by the engine, such as WOFF2 with Forme. |
font_too_large | The font is over 2 MiB. |
fetch_error | The fetch failed. |