Collabora convert-to converter dialect (#631) #647

Merged
Cordy merged 10 commits from fix-631 into main 2026-09-22 19:20:29 +00:00
Owner

Closes #631.

  • internal/preview: NewCollaboraConverter next to the Gotenberg constructor via a shared newConverter(baseURL, route, field, ...) — Collabora's route is /cool/convert-to/pdf, the upload travels in multipart field data (Gotenberg: files). Cache, single-flight, eviction and error semantics unchanged and shared.
  • Config: preview.converterKind: "gotenberg" | "collabora", default gotenberg; CAIRN_PREVIEW_CONVERTER_KIND env wins (CAIRN_LICENSE_KEY rule). Unknown kind warns and falls back to gotenberg.
  • deployment.md: converterKind row + "Collabora as the converter (no Gotenberg)" section with the three honest converter postures.
  • interop-collabora.yml (permanent, manual dispatch): live convert-to against the homelab CODE via the internal service address — verified green (12.5 KB PDF back). The public hostname path is denied by coolwsd's post_allow on purpose (Caddy forwards the real client in X-Forwarded-For); homelab-config now allows private callers incl. the IPv6-mapped ::ffff: forms.

Tests: internal/preview/convert_collabora_test.go (route append, data field, Gotenberg dialect regression).

Closes #631. - `internal/preview`: `NewCollaboraConverter` next to the Gotenberg constructor via a shared `newConverter(baseURL, route, field, ...)` — Collabora's route is `/cool/convert-to/pdf`, the upload travels in multipart field `data` (Gotenberg: `files`). Cache, single-flight, eviction and error semantics unchanged and shared. - Config: `preview.converterKind: "gotenberg" | "collabora"`, default gotenberg; `CAIRN_PREVIEW_CONVERTER_KIND` env wins (CAIRN_LICENSE_KEY rule). Unknown kind warns and falls back to gotenberg. - deployment.md: converterKind row + "Collabora as the converter (no Gotenberg)" section with the three honest converter postures. - `interop-collabora.yml` (permanent, manual dispatch): live convert-to against the homelab CODE via the internal service address — verified green (12.5 KB PDF back). The public hostname path is denied by coolwsd's post_allow on purpose (Caddy forwards the real client in X-Forwarded-For); homelab-config now allows private callers incl. the IPv6-mapped `::ffff:` forms. Tests: internal/preview/convert_collabora_test.go (route append, `data` field, Gotenberg dialect regression).
Cordy merged commit 7b5a1e98ea into main 2026-09-22 19:20:29 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#647
No description provided.