Answer the question
In order to leave comments, you need to log in
How to make a variable in .ENV not visible when requested?
Hello! I am learning react and when creating a simple todo (more precisely, having already completed the process), I ran into an unpleasant situation - my API KEY, which I so diligently hid ...
it turns out to be visible in the Network tab:
I tried to google, but somehow it doesn’t work out. I find only the process itself, how to use environment variables, which I already did ... Tell me what to do, thanks in advance!
Answer the question
In order to leave comments, you need to log in
The only way is not to give this key to the client. Make a method on the server that the client will access, and the server will make a request where necessary, passing the key.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question