Join the Webstudio community

Updated 3 months ago

Hey, Webstudio team!I'm working with a tech-savvy

At a glance

The community member is working with a tech-savvy client who has questions about how Webstudio works with APIs. The main questions are:

1) Will the API requests be made from the individual end-visitors' devices, or via Webstudio?

2) When the API responds with new or updated content, how long until it is shown on the webpage? When are the requests made, and is the data cached?

In the comments, a community member explains that the requests are made via Cloudflare Workers (backend), and there are no security concerns with this approach as the API key is not shared with the client or in unencrypted traffic. They also mention caching, and suggest referring to the Webstudio documentation for more information.

There is no explicitly marked answer in the post or comments.

Useful resources
Hey, Webstudio team!
I'm working with a tech-savvy client who asked a few questions re: how Webstudio works with APIs. Hope you can shed some light on this, so I can answer them:

1) Will the requests be made from the individual end-visitors devices, or somehow via Webstudio? (The reason they are asking is if there are other authentication methods other than API key (which is relatively insecure πŸ˜…)

2) When the API responds with a new content item, or has updated information for an existing content item, how long until that is shown in the webpage? I.e. when are the requests made, and is the data cached somewhere (and for how long)?

cc @Oleg Isonen @John Siciliano
J
O
D
3 comments
  1. Made via Cloudflare Workers (backend). I don't have security concerns with this. Plus 99% of the time, these APIs are just delivering public data
  1. See this about caching https://docs.webstudio.is/university/foundations/variables#caching
let me know if you have any further questions
I have no concerns with this authentication method whatsoever. API key is never shared to the client or outgoing / unencrypted traffic, its between the worker and our database.
Thank you both!
Add a reply
Sign up and join the conversation on Discord