Skip to content

Add feature flag for workhorse content type calculation

What does this MR do?

Added a new feature flag to manage the new changes made in Workhorse for calculating the content-type and content-disposition.

This MR introduces a new header as a signaling mechanism for Workhorse:

  • Gitlab-Workhorse-Detect-Content-Type. This flag will be set when the feature is enabled and only if the response has the headers X-Sendfile or specifically in any place we want Workhorse to detect the content type. This header is the same one Workhorse uses to determine if it has to act in the response. Only if Workhorse sees Gitlab-Workhorse-Detect-Content-Type the new behavior will run.
  • The feature flag that handles this new behavior is workhorse_set_content_type

The MR with the changes in Workhorse is gitlab-workhorse!335 (merged)

What are the relevant issue numbers?

Refs: https://gitlab.com/gitlab-org/gitlab-ce/issues/36103

Does this MR meet the acceptance criteria?

Edited by Nick Thomas

Merge request reports