Skip to content

Expose ETag header of API requests to XHR requests

What does this MR do and why?

Contributes to #479248 (closed)

Problem

Access-Control-Expose-Headers header is missing the ETag which prevents clients from using caching mechanisms.

Solution

Explicitly allow Etag header.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2024-08-30_at_14.44.53 Screenshot_2024-08-30_at_14.50.25

How to set up and validate locally

  1. curl -I --header 'Origin: http://localhost:8080' http://gdk.test:3000/api/v4/projects/2/repository/tree
  2. You should see ETag in Access-Control-Expose-Headers header
Edited by Vasilii Iakliushin

Merge request reports