fix: PDF okuma — nginx .mjs worker dosyasını octet-stream sunuyordu, tarayıcı worker'ı reddediyordu
pdfjs worker'ı Vite tarafından pdf.worker.min-<hash>.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 <noreply@anthropic.com>
This commit is contained in:
@@ -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/ {
|
||||
|
||||
Reference in New Issue
Block a user