PHP Programming/Secure HTTP headers

The returned by a PHP script can reveal its security breaches.

Hide versions
To avoid to be the target of the security breaches linked to a PHP or a web server version, it's better to hide them in the HTTP headers.

This is generally done in the server configuration files, but can also be realized in PHP:

Other attacks
The can be prevented by configuration.

Example of protections:

Attention: a bad configuration can provoke (CORS) errors.