如何隐藏网络选项卡中的数据? [英] How to hide data from network tab?

查看:85
本文介绍了如何隐藏网络选项卡中的数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 Angular 应用程序中,如果我转到开发工具网络选项卡,我将能够看到来自后端的响应和请求.有谁知道如何隐藏或屏蔽这些数据,如果我进行服务器端渲染,这可能吗?

In my angular application if I go to dev tools network tab I will be able to see the response and request coming from the back end. Do anyone know how to hide or mask this data, is this possible if I do the server-side rendering?

推荐答案

将显示请求.

这无法停止,应用程序正在发出请求,这将被浏览器记录到网络选项卡,如评论中所述,如果存在安全问题,您应该以不同的方式处理.不要将数据发送到客户端,而这些数据一开始就不应该被允许访问.

This cannot be stopped, the application is making requests and this will be logged to the network tab by the browser, as mentioned in the comments, if there are security concenrns you should be handling this a different way. Do not send data to the client that they should not be allowed access to in the first place.

为了在数据被截获的情况下尝试确保通过 HTTPS 运行的安全性,这样数据就不会是可用的数据.正如评论中提到的,大多数数据将由用户提供.含义 in 不应隐藏在网络选项卡中.

To try and ensure security run over HTTPS on the off chance to data gets intercepted, that way it will not be usable data. Most data, as mentioned in the comments, will be provided by the user. Meaning in should not need to be hidden within the network tab.

最坏的情况是,有人坐在他们的计算机前阅读网络选项卡中的内容,但在开发应用程序时无法考虑这种情况.您可以 base64 对正在发送和发送的数据进行编码,因此对于任何应该看到网络选项卡的人来说,它的可读性会降低.以下是一些与问题相关的资源,供您浏览.

Worst case scenario, someone physically sits at their computer and reads what is in the network tab, but this is a scenario that cant be accounted for when developing applications. You could base64 encode data that is being sent to and from so it is less readable to anyone who should see the network tab. Here are some resources to have a look through related to the question.

HTTPS 总结//base64 编码//Angular 的安全部分一个>

这篇关于如何隐藏网络选项卡中的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆