From 3a0403f07f58c3233ca1d7c1914f958e7f772aa8 Mon Sep 17 00:00:00 2001 From: ht Date: Sun, 6 Sep 2026 01:02:04 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20PDF=20okuma=20=E2=80=94=20nginx=20.mjs?= =?UTF-8?q?=20worker=20dosyas=C4=B1n=C4=B1=20octet-stream=20sunuyordu,=20t?= =?UTF-8?q?aray=C4=B1c=C4=B1=20worker'=C4=B1=20reddediyordu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pdfjs worker'ı Vite tarafından pdf.worker.min-.mjs olarak üretiliyor. Debian nginx'in mime.types dosyasında mjs uzantısı olmadığından dosya application/octet-stream ile geliyor; tarayıcılar modül worker'ını yalnızca JavaScript MIME tipiyle yüklediği için her PDF yüklemesinde "Setting up fake worker failed: Failed to fetch dynamically imported module" hatası çıkıyor, belge analizi tamamlanamıyordu. mjs → application/javascript eşlemesi eklendi (nginx -t ile doğrulandı). Co-Authored-By: Claude Fable 5.1 --- nginx.conf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nginx.conf b/nginx.conf index 6117ac5..cd14e5c 100644 --- a/nginx.conf +++ b/nginx.conf @@ -6,6 +6,12 @@ server { index index.html; include /etc/nginx/mime.types; + # Vite, pdf.js worker'ını .mjs uzantısıyla üretiyor; Debian'ın mime.types + # dosyasında mjs yok → application/octet-stream sunuluyordu ve tarayıcı + # modül worker'ını yüklemeyi reddediyordu ("Setting up fake worker failed"). + types { + application/javascript mjs; + } # Canlı veri backend'i (aynı container'da Node, port 3001) location /api/ {