-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add grpc-web gateways for REST access to Journal and Shard APIs
Use the `github.com/grpc-ecosystem/grpc-gateway` project to automatically generate REST handlers for portions of the Journals and Shards gRPC services. Also implement a CORS wrapper with configurable allowed origins. Together these changes allow Gazette brokers and consumers to be directly queried by browsers in cross-origin contexts. Note that REST handlers automatically forward `Authorization: Bearer` tokens into their corresponding gRPC handlers, so authorization checks "just work".
- Loading branch information
1 parent
d0c9d56
commit dc5ad84
Showing
11 changed files
with
550 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
type: google.api.Service | ||
config_version: 3 | ||
|
||
http: | ||
rules: | ||
- selector: protocol.Journal.List | ||
post: /v1/journals/list | ||
body: "*" | ||
- selector: protocol.Journal.Read | ||
post: /v1/journals/read | ||
body: "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.