Home  >  Article  >  Backend Development  >  Why is there sometimes a value of X-Powered-By in the header of an HTTP request and sometimes not?

Why is there sometimes a value of X-Powered-By in the header of an HTTP request and sometimes not?

WBOY
WBOYOriginal
2016-07-29 09:16:171914browse

x-powered-by is not output by Apache or Nginx, but output by a language parser or application framework. The meaning of this value is used to tell what language or framework the website is written in.
For example:

  • php

PHP standard output is:

thinkphp
  • If you use ThinkPHP, it will output: ASP.NET, can modify
web.config

and delete

    When compiling nginx, you can add a module, HttpHeadersMore, to uniformly delete or modify the returned http headers.
  • Key content In addition, the web server itself will also spit out its own version number. The http header is Server:xxxxx. This sometimes causes someone to specifically exploit the vulnerability of a specific version of the web server to attack. nginx can add or modify it in the configuration file
server_tokens off

to remove the version number.

The above introduces why in the header of HTTP request, sometimes there is the value X-Powered-By, and sometimes there is not? , including relevant content, I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn