Skip to content

Commit c837ac9

Browse files
authored
add the organization header to HTTP requests (#956)
Our API requires that we pass the organization header to get the organization context. One example where this matters is when getting the list of locations. Some organizations are allowed to see the Fly locations, while other organizations from the same user may not.
2 parents 9b8bee6 + 51fa9a2 commit c837ac9

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

internal/turso/turso.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ func (t *Client) newRequest(method, urlPath string, body io.Reader, contentType
8787
}
8888
req.Header.Add("User-Agent", fmt.Sprintf("turso-cli/%s (%s/%s)", parsedCliVersion, runtime.GOOS, runtime.GOARCH))
8989
req.Header.Add("Content-Type", contentType)
90+
req.Header.Add("x-turso-organization", t.Org)
9091
return req, nil
9192
}
9293

0 commit comments

Comments
 (0)