-
-
Notifications
You must be signed in to change notification settings - Fork 500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serverless and user input beyond dynamic slugs or query parameters #2057
Comments
I tried to hack my way through this, but couldn't find a solution. Especially tried to add a property to the |
@solution-loisir Thanks for taking a shot at it. I also tried the Netlify Functions route but still feel like I'm missing something. It looks like the answer lies in https://www.11ty.dev/docs/plugins/serverless/
See Config Global Data coming in v1.0.0. I'm hoping that's the route to creating serverless NetlifyCMS Custom Previews #2019. Unfortunately, I don't have the skillset to test the theory :-( |
I've tried to use the |
@solution-loisir Same here. I certainly feel like I'm missing something very key. I thought the dates under the tags https://github.com/11ty/eleventy/tags imply the beta numbers are increasing. |
@stevenmilstein Might be of interest to you. I answered myself here: #2137. Turns out the |
@solution-loisir Thanks for the addGlobalData example. Now the only blocking issue is
I tried POSTing a request body but I think serverless functions are restricted to GET. |
My pleasure, I like playing around to learn new useful things, and learning in public is a great way make others benefit!
I'm pretty sure you can POST request to a serverless function. There are a lot of exemple here (not exclusively POST request exemples): https://functions.netlify.com/examples/. Any time a user submit sensitive information like a password it would need to be submitted through a POST method. Maybe you have an exemple of your implementation. |
@solution-loisir you're absolutely right about POSTs and Netlify Functions. I've even been able to implement a few of my own. However, as per 11ty Serverless:
And according to On-demand Builders | Netlify Docs:
So I'm still confused about 11ty Serverless Bundler Options stating
When I console.log for
even after trying a Thanks for hanging in there! |
Hi, due to their nature, I guess it's logic for On-demand Builders to only accept GET request. The |
Stale per project slipstream changes in #3074. |
Regarding https://www.11ty.dev/docs/plugins/serverless/#escaping-user-input, are there any other options for passing data to serverless pages aside from dynamic slugs or query parameters via the URL? Among URL length limitations, special characters like {% %} are also not permitted.
Is it possible to send form data or, JSON to the Data Cascade?
Any insight is greatly appreciated!
The text was updated successfully, but these errors were encountered: