Open
Description
Hello maybe I am missing something here but since the env
object can be edited by anyone through the console, then I suppose we don't really gain a lot by exposing it through the index.html
right? I am trying to do something similar in my project by using similarly an env var that would expose api endpoints during runtime, and I am wondering if a possible solution would be to call Object.freeze() on that ? So like this:
<title>React App</title>
<script>
env = Object.freeze(%REACT_APP_ENV%)
</script>
</head>
Metadata
Assignees
Labels
No labels