Netlify Adapter on Hybrid sites: Use static for 404 instead of SSR #979
regisphilibert
started this conversation in
Proposal
Replies: 1 comment
-
I'm surprised this does not get any traction. With the amount of bots trying 50 wp-includes URL in a minute and hitting sites mutliple times per day we have to go over the Level 0 of functions and so we end up paying for this limitation. Right now I'm monitoring every 404 paths and adding bulk redirects to make sure they land anywhere but the default 404. |
Beta Was this translation helpful? Give feedback.
0 replies
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. But more than that bots are constantly hitting sites with request for wp-includes, wp-admin, adfs/ls and so forth... With all of this, it's very difficult to keep your Netlify site below the Level 1 function upgrade.
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