简体   繁体   English

对浏览器隐藏服务器端技术信息

[英]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:在这种情况下,它显示以下信息:

  • Node.js (Programming language) Node.js(编程语言)
  • Express (Web framework) Express(网络框架)
  • Connect (Web framework)连接(网络框架)

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.

相关问题 如何从 PayPal SDK,服务器端获取交易信息 - How to get transaction information from PayPal SDK, server-side 从 PayPal 的 JavaScript SDK 更新服务器端信息 - Updating server-side information from PayPal's JavaScript SDK 如何向用户隐藏Backbone中的服务器端API? - How to hide server-side API in Backbone from the user? 使用纯Javascript和NO服务器端技术将表单值从一页安全地发布到客户端的另一页 - Posting form values securely from one page to another on client-side using pure Javascript and NO server-side technology 显示/隐藏具有服务器端日志记录的div - show/hide a div with server-side logging 服务器端Web浏览器是否支持PHP? - Server-side web browser for PHP? 从服务器端代码获取会话信息到客户端代码 - acquiring session information from server-side code, to client-side code 如何在服务器端(php)接收使用XMLHttpRequest从浏览器发送的数据? - How to receive data, sent from the browser using XMLHttpRequest, in server-side (php)? 如何从NodeJS(服务器端,而不是浏览器)打开“选择文件夹”对话框? - How to open a “Select folder” dialog from NodeJS (server-side, not browser)? 如何从应用程序的服务器端向浏览器JavaScript发送事件? - How can I send an event to my browser JavaScript from the server-side of my app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM