dshost-plugin 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/core.js +3 -2
- package/package.json +1 -1
package/lib/core.js
CHANGED
|
@@ -408,10 +408,11 @@ export function startAgent(opts) {
|
|
|
408
408
|
let buf;
|
|
409
409
|
try { buf = fs.readFileSync(rawPath); } catch (e) { return fail(500, 'read failed: ' + e.message); }
|
|
410
410
|
const mime = ARTIFACT_MIME[ext] || 'text/plain; charset=utf-8';
|
|
411
|
+
// [EO实测] 响应头只保留 content-type + content-length:
|
|
412
|
+
// 携带 cache-control/content-disposition 时 EdgeOne 会静默吞掉该响应
|
|
411
413
|
artifactRespond(ws, sid, 200, {
|
|
412
414
|
'content-type': mime,
|
|
413
|
-
'content-
|
|
414
|
-
'cache-control': 'no-store',
|
|
415
|
+
'content-length': String(buf.length),
|
|
415
416
|
}, buf);
|
|
416
417
|
log.log?.(`[agent] artifact served: ${rawPath} (${buf.length}B)`);
|
|
417
418
|
return true;
|
package/package.json
CHANGED