Replies: 2 comments 2 replies
-
I believe if you use the private env modules, it will be difficult to accidentally expose environment variables.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Does prerendering work on pages with actions? , I get this error whenever I try to prerender a page with actions. Cannot prerender pages with actions
Error: Cannot prerender pages with actions // page.server.ts
export const actions: Actions = {
default: async ({ request }) => {
const formData = await request.formData();
const email = formData.get('email');
const firstName = formData.get('firstName');
const lastName = formData.get('lastName');
const phoneNumber = formData.get('phoneNumber');
if (email && firstName && lastName && phoneNumber) {
return { success: true }
}
return { failure: true }
}
}
export const prerender = true; |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This may seem a bit out there, but I was wondering: How does Static Prerendering handle POST endpoints (+page.server.js) files on a CDN?
I want to run a Sendgrid function with Environment Variables by submitting a form and I'm worried that it might expose the environment variables.
The site will be hosted on CloudFlare pages. Do endpoints invoke workers or do they function differently?
Beta Was this translation helpful? Give feedback.
All reactions