Environment variable are not hidden (secure)?

梦想的初衷 提交于 2020-01-05 06:24:47

问题


I found with my browser inspector some private credentials located in my environment file. They're not hidden ? That's not secure... I did something wrong ?


回答1:


If you included them in your environment.ts in your Angular project then they will not be hidden. You can not include any secret values directly in your front-end Angular project as everything will be transferred to the client.

If you need to use a secret of some kind then usually they are only accessible by your back-end code and hidden behind your API.



来源:https://stackoverflow.com/questions/55443260/environment-variable-are-not-hidden-secure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!