You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gwyn recommended to implement a feature when a user can define an url where the request will be sent from the frontend instead of localhost to handle the subscription.
The use case is a static application that does not have a server middleware but the users would still want to be able to add to newsletter.
Looks good. Just want to clarify, if I set newsletter.url to a env variable that is undefined - it would then try and use the nuxt server middleware by default?
Thinking of how to set env variables so that, in development, we can use SSR mode and the server middleware. But in production we use the custom api.
This feature is a recommendation based on the conversation on Twitter. (https://twitter.com/GwynHockridge/status/1546580353292402689?s=20&t=HCbpzfd3xAMxQr71EOkBhg)
Gwyn recommended to implement a feature when a user can define an url where the request will be sent from the frontend instead of localhost to handle the subscription.
The use case is a static application that does not have a server middleware but the users would still want to be able to add to newsletter.
The implementation could look like this:
After setting the url property,
useNewsletterSubscribe
composable will instead send a request to that url and await for the response:The text was updated successfully, but these errors were encountered: