Netlify Adapter on Hybrid sites: Use static for 404 instead of SSR #979
regisphilibert
started this conversation in
Proposal
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I'm not sure where to start this conversation as this has not been labeled as a bug. See conversation here and Doc PR attempt here. But I feel like this needs discussion for future improvement on a platform with so many (and sure more in the future) Netlify users.
Currently when using a hybrid site, the Netlify Adapter will invoke the SSR function to serve a the /
404.astro
page in spite of it beingprerendered
either the defaultoutput: hybrid
settings or its ownexport const prerender = true
.Background & Motivation
A hybrid site by definition has much more prerendered routes than not so when the site serves its 404 as SSR, this triggers thousands of function invocations (404 happens, especially of popular site with many CMS edits) without the knowledge or control of the developers. One massive emailing typo and the surge can really get you closer to your monthly allowance.
Goals
This is why I think this should be addressed so that a static site, in spite of its limited numbers of SSR routes remain mostly a static site with very little duress on Netlify or other.
If a fix is not possible or to complicated to address at the moment, at the very list the developer should be informed of this limitation like withastro/docs#6546 aimed to.
Beta Was this translation helpful? Give feedback.
All reactions