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

Support resending headers on redirects #396

Open
1 task done
ag-TJNII opened this issue Mar 12, 2024 · 0 comments
Open
1 task done

Support resending headers on redirects #396

ag-TJNII opened this issue Mar 12, 2024 · 0 comments

Comments

@ag-TJNII
Copy link

Terraform CLI and Provider Versions

registry.terraform.io/hashicorp/http 3.4.2
Terraform: 1.3.4

Use Cases or Problem Statement

We have an API we read with the Terraform Data provider that will redirect the client to a different instance if the first instance is not authoritative for the requested data. The http provider appears to follow these redirects, but does not resend all the headers specified on the second request. (No logs of this, due to #395). Not sending the Authorization header is expected default behavior. However, there are cases where it is desirable. For example cURL contains the --location-trusted flag for this case. I would like to see a similar flag in this provider.

Proposal

Add a boolean location-trusted attribute to the provider. Default should be false, and the same behavior as we have today. When true the client resends all the headers specified in the original request on redirects.

How much impact is this issue causing?

Medium

Additional Information

https://curl.se/docs/manpage.html#--location-trusted

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant