Hi,
We have a problem regarding our “Function Invocations” usage.
In order to handle i18n path segments, our CMS is articulated around an optional catch-all route that takes an array of paths ingetStaticPaths
. fallback
is set to “blocking” allowing us to create new pages on the fly from our CMS.
From this we can observe an unwanted side effects: our optional catch-all route [[...path]]
also captures all undesired requests made by malicious actors like wp-...
, *.php
… Here is an extract of Vercel logs below:
Oct 01 09:44:31.34 GET 404 {REDACTED_HOST} /wp-login.php
Oct 01 09:41:34.31 GET 404 {REDACTED_HOST} /lufix.php
Oct 01 09:41:34.15 GET 404 {REDACTED_HOST} /pepper/wp-content/themes/pridmag/db.php
Oct 01 09:41:33.96 GET 404 {REDACTED_HOST} /hplfuns.php
Oct 01 09:41:33.82 GET 404 {REDACTED_HOST} /wp-content/ovabvpwdb.php
Oct 01 09:41:33.67 GET 404 {REDACTED_HOST} /data.php
Oct 01 09:41:33.48 GET 404 {REDACTED_HOST} /wp-includes/wp-class.php
Oct 01 09:41:33.34 GET 404 {REDACTED_HOST} /mah.php
Oct 01 09:41:33.18 GET 404 {REDACTED_HOST} /wp-content/plugins/wp-sec/wp.php
Oct 01 09:41:33.11 GET 404 {REDACTED_HOST} /wp-content/plugins/czyfidusba/wp-editor.php
This phenomenon is amplified as we host almost 260 sites with high seasonal traffic on Vercel. The 1 million request quota is exceeded in less than 7 days and we are not even at the peak of our potential traffic.
Changing thegetStaticPath
fallback
config to false
is not an option as it would prevent us to update our sites with our CMS: revalidation is not possible on paths that were not present when the build was done.
What are our options to circumvent this issue and prevent these unwanted function invocations?
Please let me know if additional context is necessary.
Thank you in advance for your assistance.