@server/next 0.20.37 → 0.20.39

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@server/next",
3
- "version": "0.20.37",
3
+ "version": "0.20.39",
4
4
  "description": "A fully-fledged web server with routing, file uploads, sessions, static files, schema validation, websockets, testing, etc.",
5
5
  "homepage": "https://server-js.com/",
6
6
  "repository": "https://github.com/franciscop/server-next.git",
@@ -38,9 +38,10 @@ export default async function handleRequest(handlers, ctx) {
38
38
  }
39
39
 
40
40
  // In Netlify, a non-response is perfectly valid, which would indicate
41
- // the edge function to just go ahead and consume the original resource
42
- if (ctx.platform.provider === "netlify") {
43
- return ctx.req.context.next();
41
+ // the edge function to just go ahead and consume the original resource. But
42
+ // we have already "consumed" the resource, so we can only return the next one
43
+ if (ctx.machine.provider === "netlify") {
44
+ return await ctx.req.context.next();
44
45
  }
45
46
 
46
47
  // In other environments, a non-response is wrong and we should 404 then