Skip to content
Snippets Groups Projects

Expose ETag header of API requests to XHR requests

Merged Vasilii Iakliushin requested to merge 479248_expose_etag_in_access_control_header into master

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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading