enable transparent cookie forwarding #12
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
My implementation replies on using a cookies to authenticate websocket
connections and normal HTTP RESTful endpoints with a mux used to convert
the cookies to metadata.
I believe that this is suitable configuration for the
grpc-websocket-proxy project as it makes the websocket-based requests
more consistent with the standard HTTP based requests (which have
cookies available) at the GRPC gateway.
It also allows the use case of creating a cookie based mechanism to
inject metadata; I simply added an interceptor to convert a specific
cookie into GRPC metadata.
I don't think it introduces a security risk, as handling cookies is
deferred to the GRPC gateway code itself.
Thanks for the websocket gateway, it's made developing a web app that
consumes my GRPC API much easier.