You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ FIXES
5
5
* Fix sessions handling in stateless and load balanced environments
6
6
7
7
IMPROVEMENTS
8
-
8
+
* Add `Authorization: Bearer` header support for Terraform token in proxy environments
9
9
* Add `--heartbeat-interval` CLI flag and `MCP_HEARTBEAT_INTERVAL` env var for HTTP heartbeat in load-balanced environments
10
10
* Set custom User-Agent header for TFE API requests to enable tracking MCP server usage separately from other go-tfe clients [268](https://github.com/hashicorp/terraform-mcp-server/pull/268)
11
11
* Adding a new cli flags `--log-level` to set the desired log level for the server logs and `--log-format` for the logs formatting [286](https://github.com/hashicorp/terraform-mcp-server/pull/286)
// For token, also support Authorization: Bearer header as fallback
151
+
ifheaderValue==""&&header==TerraformToken {
152
+
headerValue=getTokenFromAuthHeader(r)
153
+
}
139
154
140
155
ifheaderValue=="" {
141
156
headerValue=r.URL.Query().Get(header)
142
157
143
-
// Explicitly disallow TerraformToken in query parameters for security reasons
144
158
ifheader==TerraformToken&&headerValue!="" {
145
159
logger.Info(fmt.Sprintf("Terraform token was provided in query parameters by client %v, terminating request", r.RemoteAddr))
146
-
http.Error(w, "Terraform token should not be provided in query parameters for security reasons, use the terraform_token header", http.StatusBadRequest)
160
+
http.Error(w, "Terraform token should not be provided in query parameters for security reasons, use the Authorization header", http.StatusBadRequest)
0 commit comments