Skip to content

Add reusable Gitlab::Tracking::Helpers module

Patrick Bajao requested to merge 295265-reuse-dnt-enabled into master

What does this MR do?

There are several controllers/concerns/modules that checks for the DNT header and the logic are the same.

To make them DRY, a new Gitlab::Tracking::Helpers module was added to encapsulate the following methods:

  • dnt_enabled?
  • trackable_html_request?

This module is then included in those controllers/concerns/modules and call the methods that they need.

Does this MR meet the acceptance criteria?

Conformity

Related to #295265 (closed)

Edited by Patrick Bajao

Merge request reports