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

UrlStorage blacklist of forwarded headers #246

Merged
merged 4 commits into from
May 19, 2024

Conversation

KrKOo
Copy link
Contributor

@KrKOo KrKOo commented May 16, 2024

This PR introduces the ability to define headers that should not be forwarded when forward_headers is enabled, as described in issue #243.

Example config

...
[resolvers.storage]
url = "http://localhost:8080"
response_url = "https://example.com"
forward_headers = true
header_blacklist = ["Host"]
...

@brainstorm
Copy link
Member

This is great, thanks @KrKOo! I'm missing some documentation though, could you please describe your example in the docs and provide the resolver config you mentioned in the description of this PR?

Thanks again!

@mmalenic Any other observations? Does this PR fit with your recent hyper->reqwest transition?

Copy link
Member

@mmalenic mmalenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this @KrKOo. This is really good, and thanks for testing. Other than some documentation like @brainstorm said, could you please also run cargo fmt, this should fix the CI tests.

@mmalenic Any other observations? Does this PR fit with your recent hyper->reqwest transition?

All good in relation to hyper/reqwest, these changes aren't affecting that portion of the code as they only edit the out-going headers in the URL tickets.

@KrKOo
Copy link
Contributor Author

KrKOo commented May 17, 2024

Hey, while writing the docs, I realized that the headers were not removed from the request made by htsget-rs to the resource server, so I added that as well.

@mmalenic
Copy link
Member

This is great, thanks @KrKOo!

@brainstorm brainstorm added this pull request to the merge queue May 19, 2024
Merged via the queue into umccr:main with commit b856d0c May 19, 2024
3 checks passed
@brainstorm
Copy link
Member

Thanks again @KrKOo for your contribution! 🎉

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.

None yet

3 participants