Commit Graph

9 Commits

Author SHA1 Message Date
CanbiZ (MickLesk) 0205717cb9 fix(bentopdf): create default config.json to avoid runtime 404
BentoPDF fetches /config.json at runtime. In our build/deploy flow this file
may be missing, causing noisy 404 errors in the browser console.

Create a minimal default config.json ({}), only when absent, during install
and update so custom configs are not overwritten.
2026-04-10 08:25:05 +02:00
CanbiZ (MickLesk) fbf73b6e23 fix(bentopdf): enforce https for SharedArrayBuffer on LAN
LibreOffice WASM requires crossOriginIsolated + secure context.
LAN HTTP origins (http://192.168.x.x) are not trustworthy, so Office
conversion fails with DataCloneError on SharedArrayBuffer transfer.

- generate self-signed TLS cert (idempotent)
- add HTTPS server on :8443
- redirect HTTP :8080 to HTTPS :8443
- keep WASM gzip/mime handling
- update post-install URL hint to https://IP:8443
2026-04-10 08:22:31 +02:00
CanbiZ (MickLesk) c0d12a797a fix(bentopdf): serve libreoffice wasm gz with correct nginx headers
Fix Word/Excel conversion hang by serving /libreoffice-wasm assets with
proper MIME types and Content-Encoding.

- serve soffice.wasm.gz as application/wasm + Content-Encoding: gzip
- serve soffice.data.gz as octet-stream + Content-Encoding: gzip
- add immutable caching for wasm/data assets
- always refresh nginx site+service during update to migrate existing installs
- switch install script dependency handling to ensure_dependencies nginx
2026-04-10 08:20:19 +02:00
Tobias 9120546c26 Install nginx as a dependency 2026-04-09 19:19:16 +02:00
CanbiZ (MickLesk) c768da0cb1 fix(bentopdf): replace http-server with nginx for COOP/COEP headers
Word/Excel/PowerPoint to PDF conversion uses LibreOffice WASM which
requires SharedArrayBuffer. SharedArrayBuffer only works when the server
sends Cross-Origin-Opener-Policy: same-origin and
Cross-Origin-Embedder-Policy: require-corp headers.

The previous http-server setup did not send these headers, causing WASM
initialization to time out for office-format conversions.

Fix: replace http-server with nginx and configure COOP/COEP headers in the
nginx site config, matching the upstream Docker image's nginx.conf.

Also adds a one-time migration path in update_script for existing installs
running the old http-server service.
2026-04-09 18:26:20 +02:00
Chris 352716319f Refactor: BentoPDF (#12597)
* Refactor BentoPDF

* preserve .env.production if it exists

* Increase CPU cores to 2
2026-03-05 18:53:15 +01:00
Tobias c1fe8b91b4 chore: bump copyright to 2026 - happy new year (#10585)
* chore: bump copyright to 2026 - happy new year

* fix

* meilisearch fix source url

* livebook: fix space

* fix source cmd

* fix source cmd
2026-01-06 13:28:12 +01:00
CanbiZ afe330173e Refactor cleanup steps to use cleanup_lxc function (#9354) 2025-11-22 17:27:13 +01:00
push-app-to-main[bot] 6e3aeab72f BentoPDF (#8735)
Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com>
2025-10-30 09:00:41 +01:00