Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

HTTP-Headers Cleaner

Security covered Under active development 74 sites

This module allows you to remove unnecessary or sensitive information from HTTP headers and meta tags. You can configure which elements to remove and define custom patterns to identify them.

CONTENTS OF THIS FILE
---------------------

* Introduction
* Requirements
* Recommended modules
* Installation
* Configuration
* Troubleshooting
* FAQ
* Maintainers

INTRODUCTION
------------
The Http Headers Cleaner remove useless or insecure information from http headers or meta tags.
For example, it can remove the x-generator information.
The elements to remove are fully configurable and you can define several pattern rules
to identify which elements you to remove.

REQUIREMENTS
------------

This module requires no modules outside of Drupal core.

RECOMMENDED MODULES
-------------------

- Yaml Editor (https://www.drupal.org/project/yaml_editor):
Simplify yaml configuration.

INSTALLATION
------------

* Install as you would normally install a contributed Drupal module. Visit
https://www.drupal.org/node/1897420 for further information.

CONFIGURATION
-------------

* Configure the user permissions in Administration » People » Permissions:

- Use the administration pages and help (System module)

* Access administration form in Administration » Configuration » System » HTTP-Headers cleaner settings.
- Enable HTTP-headers and use the yaml editor :
Define an associative array {header-id: [pattern1, pattern2]}
If no pattern is defined, the header will be removed.
If patterns are defined, only matching elements will be removed.
Ex.

x-drupal-dynamic-cache: null
x-drupal-cache-tags: null
x-drupal-cache-contexts: null
x-drupal-cache-max-age: null
x-generator: null
x-drupal-cache: null
link:
- '/rel="revision"/'
- '/rel="shortlink"/'
- '/rel="delete-form"/'
- '/rel="delete-multiple-form"/'
- '/rel="edit-form"/'
- '/rel="version-history"/'
- '/rel="revision"/'
- '/rel="drupal:content-translation-overview"/'
- '/rel="drupal:content-translation-add"/'
- '/rel="drupal:content-translation-edit"/'
- '/rel="drupal:content-translation-delete"/'

- Enable Meta tags and use the yaml editor :
Define an associative array {tag: [ {attribute : [pattern1, pattern2]}]}
Ex:

meta:
  name:
    - /Generator/
link:
  rel:
    - /delete-form/
    - /shortlink/
    - /revision/
    - /delete-multiple-form/
    - /edit-form/
    - /version-history/
    - '/drupal:content-translation-overview/'
    - '/drupal:content-translation-add/'
    - '/drupal:content-translation-edit/'
    - '/drupal:content-translation-delete/'

MAINTAINERS
-----------

Current maintainers:
* Thomas Sécher (tsecher) - https://www.drupal.org/u/tsecher

Supporting organization:
* Conserto - https://conserto.pro/

Drupal 10–11

Ask your assistant about HTTP-Headers Cleaner

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
3
Tracked since
Jun 2023
Latest release
2 years ago
Releases (12 mo)
0
Maintenance
Slowing

Release Timeline

Releases

Version Type Core PHP Release date
1.0.1 Stable 10–11 Sep 7, 2024
1.0.0 Stable 8–10 Jun 22, 2023
1.0.0-rc6 Pre-release 8–10 Jun 22, 2023