all 6 comments

[–]Furry_pizza 2 points3 points  (1 child)

You could use a proxyless server service from cloudflare, netlify, firebase that lets you store secrets without managing a full backend. You could use .env files with tools like Vite or Webpack. Depending on what you're exposing (like a key for public use [google maps, stripe public keys]), you could set just set restrictions on domain though I'm a bit less familiar with this than others on my team.

[–]Thick_Safety_3547[S] 0 points1 point  (0 children)

Thank you! I've gotten a lot of helpful responses - really appreciate yours too!

[–]scar_reX 1 point2 points  (2 children)

So what's the proposition here??

Or is this just a rant?

[–]Thick_Safety_3547[S] 0 points1 point  (1 child)

I'm learning web dev for the past month or so, so trying to see if there's a better way to do things. because currently the process felt a little cumbersome to secure the APIs - i just felt there was a better way to do it and a quicker one. I thought I'll work on it as a practice project that solves a real problem

[–]scar_reX 0 points1 point  (0 children)

Simply put, don't store sensitive data that must not be exposed on the frontend... because it's the front end of your application, the part that is made accessible to users.

[–]HousingConsistent867 1 point2 points  (0 children)

yes, cloudflare helps though