R0Y15 / WeatherNow

A Weather Forecasting website that tells you precisely about weather
https://r0y15.github.io/WeatherNow/
27 stars 67 forks source link

Adding Netlify functions to hide API key from Network call #108

Open krtEngineer opened 1 week ago

krtEngineer commented 1 week ago

@R0Y15 I observed that API key for open weather map api is visible in network call. I am suggesting an enhancement to hide this API key using netlify serverless functions.

image

I would request to assign this issue to me. I already implemented such functions. Here is a blog on my web site on how to implement such functions: https://kurati.dev/tils/02_netlify_serverless_functions_demo

R0Y15 commented 1 week ago

Sure, please Go ahead.

krtEngineer commented 1 week ago

@R0Y15 Added PR for this issue: https://github.com/R0Y15/WeatherNow/pull/114

krtEngineer commented 1 week ago

@R0Y15 After this PR gets merged I will raise another PRs for using this Netlify function to fetch Weather Data wherever in code Open Weather API is called. A separate PR would be good with separate issue. This is easy for review. Please review this PR https://github.com/R0Y15/WeatherNow/pull/114