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

Allow Host request header to override the http request host #440

Merged
merged 9 commits into from
Jul 23, 2024

Conversation

SBGoods
Copy link
Contributor

@SBGoods SBGoods commented Jul 17, 2024

Closes: #311

This PR allows the Host request header to override the http request host. The Go standard net/http library intentionally ignores the Host request header when writing the http request. If there is a Host request header, we override the http.Request.Host before the request is sent.

@SBGoods SBGoods requested a review from a team as a code owner July 17, 2024 20:54
internal/provider/data_source_http.go Outdated Show resolved Hide resolved
internal/provider/data_source_http.go Outdated Show resolved Hide resolved
@github-actions github-actions bot added size/S and removed size/M labels Jul 19, 2024
@SBGoods SBGoods changed the title Add new allow_host_override attribute Allow Host request header to override the http request host Jul 19, 2024
@austinvalle austinvalle added this to the v3.4.4 milestone Jul 23, 2024
Copy link
Member

@austinvalle austinvalle left a comment

Choose a reason for hiding this comment

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

LGTM, a few suggestions but nothing blocking 🚀

.changes/unreleased/BUG FIXES-20240719-143606.yaml Outdated Show resolved Hide resolved
internal/provider/data_source_http.go Outdated Show resolved Hide resolved
internal/provider/data_source_http_test.go Outdated Show resolved Hide resolved
@github-actions github-actions bot added size/M and removed size/S labels Jul 23, 2024
@SBGoods SBGoods merged commit fb5fd5a into main Jul 23, 2024
47 checks passed
@SBGoods SBGoods deleted the SBGoods/override-host branch July 23, 2024 21:35
@SBGoods SBGoods added the bug label Jul 24, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Host header is not sent with request_headers
2 participants