[英]Hide server-side technology information from the browser
I have installed Wappalyzer add-on installed for Firefox browser.我已经为 Firefox 浏览器安装了 Wappalyzer 插件。 When I access my web application, it displays server-side technologies used.当我访问我的 Web 应用程序时,它会显示使用的服务器端技术。 In this case it displays following information:在这种情况下,它显示以下信息:
I need to somehow hide these information from the browser/client for security purpose.为了安全起见,我需要以某种方式从浏览器/客户端隐藏这些信息。 So, could anyone shed some light on how I do this in node.js.所以,有人可以解释一下我是如何在 node.js 中做到这一点的。 Is there any configuration settings that I can change so that they won't send unnecessary information to the browser/client.是否有任何我可以更改的配置设置,以便它们不会向浏览器/客户端发送不必要的信息。
Update:更新:
I used following code to prevent Express framework from sending 'x-powered-by' header:我使用以下代码来防止 Express 框架发送“x-powered-by”标头:
app.disable('x-powered-by');
Even after this change, the server side stack information is being displayed.即使在此更改之后,也会显示服务器端堆栈信息。
Thanks.谢谢。
Finally its working.最后它的工作。 The app.disable('x-powered-by') did the trick. app.disable('x-powered-by')成功了。 After clearing the cache Wappalyzer was not able to determine the server-side stack information.清除缓存后,Wappalyzer 无法确定服务器端堆栈信息。
Apart from server side technology by PHP frameworks, change除了 PHP 框架的服务器端技术,改变
expose_php = off
in your php.ini.在你的 php.ini 中。
对于没有自定义服务器的用户,将以下内容添加到 next.config.js:
poweredByHeader: false
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.