Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prefixes for every headers and trailers #3529

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chashikajw
Copy link
Contributor

Purpose

This will fix the custom property override issue when the header name is defined in both the request and response arrays.

From this fix it will add REQUEST_HEADER_, RESPONSE_HEADER_ and RESPONSE_TRAILER_ prefixes for particular headers.

[analytics.adapter.customProperties]
    enabled = true
    requestHeaders = ["host","content-type","content-length", "authorization","x-forwarded-for","x-original-forwarded-for","x-client-dn", ":path", ":authority"]
    responseHeaders = ["etag", "content-type"]

customer property array will be like below.

 [REQUEST_HEADER_content-type=text/json, REQUEST_HEADER_:path=/v2/pet/findByStatus?status=available, REQUEST_HEADER_host=petstore.swagger.io, REQUEST_HEADER_:authority=petstore.swagger.io, RESPONSE_HEADER_content-type=application/json, host=petstore.swagger.io, content-type=application/json, :path=/v2/pet/findByStatus?status=available, :authority=petstore.swagger.io]

This will not remove the previous headers to keep the backword compatibility.

Fixes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant