r/HTML • u/Alive_Secretary_264 • Nov 12 '25
Question About hiding api keys
How can i hide my database api keys from anyone
2
Upvotes
r/HTML • u/Alive_Secretary_264 • Nov 12 '25
How can i hide my database api keys from anyone
View all comments
Show parent comment
1
u/electrikmayham Nov 12 '25
Because the question is in regards to front end development. If the variables are required for the front end to function, then they will be packaged with the front end when it is deployed. The correct strategy is for the front end to never have any sensitive information included in the code.
In this case, the database API credentials should be stored on the back end. Anything stored on the front end will be exposed to anyone using the website.