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

Fix: map request headers to lower case to avoid key name duplications #336

Closed
VisargD opened this issue May 7, 2024 · 0 comments · Fixed by #337
Closed

Fix: map request headers to lower case to avoid key name duplications #336

VisargD opened this issue May 7, 2024 · 0 comments · Fixed by #337
Assignees
Labels
bug Something isn't working triage

Comments

@VisargD
Copy link
Collaborator

VisargD commented May 7, 2024

forward_headers setting is used to explicitly pass a header from the original request to the provider. But the original request headers will always be with lower case keys when received in gateway. Due to this, when users add the same header but with different casing, it creates a duplicate key of that header in the final request object.

For example: If the request has an authorization header but the forward_headers contains the same with capital A (Authorization), the final headers object has 2 authorization key with different casing.

Solution: Streamline this by converting the final forward headers key to lower case so that there are no differences while mapping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant