如何从Web浏览器的控制台隐藏ajax请求 [英] How to hide a ajax Request from Web Browser's Console

查看:1652
本文介绍了如何从Web浏览器的控制台隐藏ajax请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

浏览器的Web控制台的网络"选项卡显示所有ajax请求以及服务器响应.我该如何预防?有可能吗?

The Browser's web console Network Tab shows all the ajax request with the server response. How Can I prevent ? is it possible to do ?

原因是因为ajax响应会显示所有用户数据,所以这就是我要隐藏响应的原因.

The reason is because the ajax response shows all the users data, that's why I'm trying to hide the response.

推荐答案

这是不可能的,即使可行,这也是不受欢迎的解决方案",因为可以使用其他方法查看数据.

It's not possible and even if it was, it would be an undesirable "solution" because the data can be seen using other methods.

解决方案是修改您的代码,以确保仅将数据发送给他们有权查看的用户.不要在AJAX响应中转储所有用户数据.

The solution is to revise your code to ensure you only send data to the user that they are authorised to see. Don't dump all user data in the AJAX response.

这篇关于如何从Web浏览器的控制台隐藏ajax请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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