@rsc-kit/mcp 0.30.46 → 0.30.47
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/dist/recipes.js +6 -3
- package/dist/recipes.js.map +1 -1
- package/guides/caching.md +2 -1
- package/guides/coming-from-next.md +4 -3
- package/guides/deployment.md +3 -3
- package/guides/edge-caching.md +6 -6
- package/guides/go.md +15 -0
- package/guides/index.json +7 -2
- package/guides/isr.md +172 -0
- package/guides/laravel.md +16 -0
- package/guides/public-forms.md +124 -7
- package/guides/your-own-backend.md +1 -1
- package/package.json +2 -2
package/dist/recipes.js
CHANGED
|
@@ -690,7 +690,7 @@ CDN that purges by tag. changed(tag) calls the purge installed with
|
|
|
690
690
|
installPurge(async ({ tags }) => ...) from @rsc-kit/core/purge, after the
|
|
691
691
|
answer has gone - one hook, any CDN's API; a failure is logged, never fails
|
|
692
692
|
the change. On Homeport (HOMEPORT_PURGE_URL set) it is homeportPurge() with
|
|
693
|
-
nothing to install. Rsc::changed() and
|
|
693
|
+
nothing to install. Rsc::changed() and reg.Changed() post their own purge
|
|
694
694
|
there, since a backend's change never passes through the engine. The host also keeps the page itself - ISR on every host: a
|
|
695
695
|
repeat request is answered from the kept copy (X-RSC-Kit: cached, Age); past
|
|
696
696
|
revalidate the stale copy goes out at once while one render replaces it;
|
|
@@ -2910,12 +2910,15 @@ passed. A refusal handle() decides goes under its field:
|
|
|
2910
2910
|
if (await subscribed(email)) fieldErrors({ email: 'Already on the list.' })
|
|
2911
2911
|
|
|
2912
2912
|
A BACKEND: handle: (values) => rpc('Contact.send', values). A 422 from Laravel
|
|
2913
|
-
|
|
2913
|
+
(a FormRequest type-hinted on the method, whose authorize() returns true) or Go
|
|
2914
|
+
(rsckit.InvalidField) lands under the same fields, uncaught.
|
|
2914
2915
|
|
|
2915
2916
|
THE BOT TRAP: every form carries a hidden field named homepage. Filled in, the
|
|
2916
2917
|
submission is answered as a success and dropped - handle() never runs. So a
|
|
2917
2918
|
form cannot have a field named homepage. It is not a CAPTCHA; rate-limit a form
|
|
2918
|
-
worth attacking
|
|
2919
|
+
worth attacking, at the CDN or proxy: a backend sees the renderer's address on
|
|
2920
|
+
an rpc(), so Laravel's throttle on a method puts every logged-out visitor in one
|
|
2921
|
+
bucket. To limit in the backend, key on the submitted email.
|
|
2919
2922
|
|
|
2920
2923
|
A THEME draws it with one component, PublicForm (type FormsTheme from
|
|
2921
2924
|
@rsc-kit/press/forms); replace it with theme: { ...shadcn, PublicForm: Mine }.
|