Skip to content
代码片段 群组 项目
  • Stan Hu's avatar
    d44f2fb6
    Remove duplicate X-Request-Id response header · d44f2fb6
    Stan Hu 创作于
    This fixes performance bar not working with AJAX requests.
    
    Both LabKit and Rails were injecting duplicate X-Request-Id headers into
    the response stream, which caused the frontend to be interpret the value
    as a comma-separated value (e.g. LdEgVXsp1R4, LdEgVXsp1R4).
    
    The new flow behaves as the following:
    
    1. Workhorse injects X-Request-Id to the inbound HTTP request to Rails
    2. Rails looks up this value in its RequestId middleware. Since the
    value exists, Rails sets the X-Request-Id response header to this value.
    3. Workhorse doesn't append another header in the response.
    
    Distributed tracing should still work fine because Workhorse still
    generates the correlation ID.
    
    Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/60111
    d44f2fb6
    历史
    Remove duplicate X-Request-Id response header
    Stan Hu 创作于
    This fixes performance bar not working with AJAX requests.
    
    Both LabKit and Rails were injecting duplicate X-Request-Id headers into
    the response stream, which caused the frontend to be interpret the value
    as a comma-separated value (e.g. LdEgVXsp1R4, LdEgVXsp1R4).
    
    The new flow behaves as the following:
    
    1. Workhorse injects X-Request-Id to the inbound HTTP request to Rails
    2. Rails looks up this value in its RequestId middleware. Since the
    value exists, Rails sets the X-Request-Id response header to this value.
    3. Workhorse doesn't append another header in the response.
    
    Distributed tracing should still work fine because Workhorse still
    generates the correlation ID.
    
    Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/60111
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。
main_test.go 18.23 KiB