I have a problem with an old FCC project (the weather API one) I published 4 years ago and just found out I hard codded the API keys in the projects JS file.
The project is simply, one HTML file, a css file, and a JS file where I coded the API calls.
I want to replace the the API key in the following code for example with a an environment secret on github
var photoSizeApi = "https://api.flickr.com/services/rest/?method=flickr.photos.getSizes&photo_id=" + id + "&format=json&nojsoncallback=1&api_key=ec0ca2ee160a19f017eb3ddcbda7ccb4";
The thing I want to figure out is, how do I conceal or hide the API keys and prevent them from showing in the browser devtools? I just learned about github workflows and actions and using secrets…but still I can’t think of how to make it concealed in the frontend?