Skip to content

Commit 7a3b904

Browse files
committed
rpc: bring back the access key
1 parent 0684f3f commit 7a3b904

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

rpc/tenant/middleware.go

+6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ func Middleware(tenants *data.TenantTable, tenantKeys []string) func(http.Handle
1919
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
2020
ctx := r.Context()
2121

22+
// Place the access key in context as it's used by services downstream
23+
accessKey := r.Header.Get("x-access-key")
24+
if accessKey != "" {
25+
ctx = WithAccessKey(ctx, accessKey)
26+
}
27+
2228
// Get projectID from the header populated by the ingress service
2329
projectHeader := r.Header.Get("x-sequence-project")
2430
if projectHeader == "" {

0 commit comments

Comments
 (0)