Not Removing All Specified Headers

Created on 15 May 2023, over 1 year ago
Updated 2 June 2023, over 1 year ago

Using the Remove HTTP Headers module version 1.0.0 with Drupal version 9.5.8 and PHP version 8.1.14, I'm encountering an issue where certain HTTP headers are not being removed as expected.

The module has been configured to remove the following headers: X-Generator, X-Drupal-Dynamic-Cache, X-Drupal-Cache, X-Powered-By, and Server. While the first three headers are successfully removed, the X-Powered-By and Server headers persist.

This behavior contradicts the module's intended functionality to remove all specified HTTP headers. The persisting headers may expose unnecessary details about the server.

I have ensured that my configuration is correct and that there are no caching issues interfering with the module's operation.

🐛 Bug report
Status

Closed: won't fix

Version

1.0

Component

Code

Created by

🇨🇦Canada Brownell Toronto, Ontario

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Brownell
  • Status changed to Needs work over 1 year ago
  • 🇵🇹Portugal guilherme-lima-almeida Lisbon

    Hi there refringe,

    X-Powered-By is not removed, because the header is not part of the response object, given that it is not set by the Symfony application but by PHP itself. And I think the same thing applies to the Server header.

    I don't know how to remove the Server header but for the X-Powered-By you can alter your php.ini to fix it:

    expose_php = Off

  • Status changed to Closed: won't fix over 1 year ago
Production build 0.71.5 2024