frandiox / vitedge

Edge-side rendering and fullstack Vite framework
https://vitedge.js.org
MIT License
732 stars 31 forks source link

Routes with no props handler returning 404 status #66

Closed m3hari closed 2 years ago

m3hari commented 3 years ago

routes that do not have props-handler returning 404 status for the rendered document even though the content is correct.

I think this can be solved by either making sure the renderer always return a status code or avoiding NotFoundResponse for missing props here https://github.com/frandiox/vitedge/blob/37bdd74706298e14d69106da578895f4cd08a6c7/src/worker/props.js#L64

I can make a PR if the issue is acknowledged

Thanks

frandiox commented 3 years ago

Make sense for an SSR request but please make sure a props-only request gets the 404 back. Also, the src/node should have similar behavior as src/worker 👍