Skip to content

fix(grpc): expose gRPC status headers for browser gRPC-web clients - #166

Open
kutluhaneth46 wants to merge 2 commits into
0xMiden:mainfrom
kutluhaneth46:cursor/expose-grpc-cors-headers-164-88c1
Open

kutluhaneth46 wants to merge 2 commits into
0xMiden:mainfrom
kutluhaneth46:cursor/expose-grpc-cors-headers-164-88c1

Conversation

@kutluhaneth46

Copy link
Copy Markdown

Summary

Browser clients could not read grpc-status / grpc-message from transport.miden.io because the CORS layer never set Access-Control-Expose-Headers. A real InvalidArgument then looked like HTTP 200 with an empty body.

Changes

  • Expose grpc-status, grpc-message, and grpc-status-details-bin on the gRPC-web CORS layer
  • Match the exposure set used by the Miden RPC node
  • Add a regression test that pins the Status header constants

Closes #164

Without Access-Control-Expose-Headers, browsers hide grpc-status and
grpc-message, so a real InvalidArgument looks like a malformed empty
200. Match the RPC node's grpc-web exposure set. Fixes 0xMiden#164.
Compile-time coverage for the Status header constants used by the
grpc-web CORS layer so a rename cannot silently drop browser-visible
errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gRPC-web: Access-Control-Expose-Headers is missing, so a browser can never read an error status

1 participant