@junejs/server 1.0.0-dev.24 → 1.0.0-dev.25
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/dist/worker.js +1 -1
- package/package.json +1 -1
- package/src/worker.ts +5 -2
package/dist/worker.js
CHANGED
|
@@ -178,7 +178,7 @@ function withAssets(pipeline, opts = {}) {
|
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
if (assets) {
|
|
181
|
+
if (assets && (request.method === "GET" || request.method === "HEAD")) {
|
|
182
182
|
const a = await assets.fetch(request);
|
|
183
183
|
if (a.status !== 404) {
|
|
184
184
|
const ct = a.headers.get("content-type") ?? "";
|
package/package.json
CHANGED
package/src/worker.ts
CHANGED
|
@@ -322,8 +322,11 @@ export function withAssets(
|
|
|
322
322
|
}
|
|
323
323
|
|
|
324
324
|
// 2. Static assets (prerendered HTML/.md/.json, /client.js, hashed CSS)
|
|
325
|
-
// served direct.
|
|
326
|
-
|
|
325
|
+
// served direct — for reads only. Assets never answer a write, and on
|
|
326
|
+
// workerd handing the incoming request to ASSETS.fetch() consumes its
|
|
327
|
+
// body: a POST that 404s here would reach the pipeline with a used stream
|
|
328
|
+
// (POST /mcp → -32700 Parse error, an action's input gone).
|
|
329
|
+
if (assets && (request.method === "GET" || request.method === "HEAD")) {
|
|
327
330
|
const a = await assets.fetch(request);
|
|
328
331
|
if (a.status !== 404) {
|
|
329
332
|
const ct = a.headers.get("content-type") ?? "";
|