eCourt-Doc-Edit/backend/WordVersioning.Api/appsettings.json

39 lines
1,004 B
JSON
Raw Permalink Normal View History

2026-08-18 12:52:40 +07:00
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
2026-08-19 10:54:55 +07:00
"AllowedHosts": "*",
"ConnectionStrings": {
"Default": "Host=localhost;Port=35432;Database=wordversioning;Username=wordversioning;Password="
2026-08-19 10:54:55 +07:00
},
"MinIO": {
"Endpoint": "localhost:39000",
2026-08-19 10:54:55 +07:00
"AccessKey": "",
"SecretKey": "",
"UseSSL": false,
"VersionsBucket": "docx-versions",
"TemplatesBucket": "docx-templates"
},
"Authentication": {
2026-08-19 23:06:57 +07:00
"Authority": "https://localhost:8443/realms/word-versioning",
2026-08-19 10:54:55 +07:00
"ValidAudiences": [ "word-addin-officejs", "word-versioning-web" ]
},
"Cors": {
"AllowedOrigins": [ "https://localhost:3000", "http://localhost:5173" ]
Phase 12 v9.2: download-first + backend open-links (Word 16.101+ broke ms-word) การทดสอบ 6 รอบบนเครื่องจริง (Mac, Word 16.101) พิสูจน์ว่า ms-word:ofe ถูกเมินแบบไม่ deterministic ทุกรูปแบบ (http/https/query/ไม่มี query/ file:// — Word ไม่ยิง request ถึง server เลย เด้งหน้าเลือกไฟล์แทน) open -a Word <local file> ใช้ได้แต่เรียกจากเว็บไม่ได้ (sandbox + backend รัน server กลางใน production) → สรุปทางเดียวที่ deterministic คือ download-first - Backend: OpenLinkService (HMAC อายุสั้น ValidateOnStart) + OpenController /api/open/{t}/{e}/v/{did}/{vid}/file.docx และ /d/{objectKey} — ทุกอย่างอยู่ใน path ไม่มี query string (Word เมิน URL มี query), [AllowAnonymous] ด้วยลายเซ็นแทน Bearer, stream จาก MinIO + disposition ชื่อไทยเหมือนเดิม · download-link + generate-draft ออก open-link แทน presigned ของ MinIO (http) · ลบ dead code presigned ทิ้ง - Web: openDocxUrl = ดาวน์โหลดทันทีทุกครั้ง + ยิง ms-word ควบคู่แบบ best-effort + notice "ไฟล์อยู่ Downloads" — เอา heuristic สลับแอป ออก (โดนหน้าเลือกไฟล์ของ Word หลอกจนไม่ดาวน์โหลด) - Spec v9.2 + ตารางทดสอบเครื่องจริงใน acceptance-review + CLAUDE.md กฎ 13 (ms-word = best-effort เท่านั้น) + ทางเลือก helper อนาคต - backend 86 / web 58 / add-in 66 + build ครบ; QA reviewer PASS (1 round, minors 4 แก้ครบ) หมายเหตุ deploy: ต้องตั้ง OpenLinks__Secret (ค่าลับจริง) และ OpenLinks__BaseUrl (https domain ของ backend) — fail ดังตั้งแต่สตาร์ทถ้าไม่ตั้ง Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-10 13:39:23 +07:00
},
"OpenLinks": {
"//": "ลิงก์เปิดไฟล์อายุสั้น (HMAC) — prod ต้องตั้ง OpenLinks__Secret และ OpenLinks__BaseUrl (https) ผ่าน env",
"Secret": "",
"BaseUrl": "",
"ExpirySeconds": 120
2026-08-19 10:54:55 +07:00
}
2026-08-18 12:52:40 +07:00
}