Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does grpc-gateway support http middleware? #132

Closed
liaoliaopro opened this issue Apr 14, 2016 · 2 comments
Closed

Does grpc-gateway support http middleware? #132

liaoliaopro opened this issue Apr 14, 2016 · 2 comments

Comments

@liaoliaopro
Copy link

I would like to add some middlewares like CORS, gzip etc. for the generated rest api. Is there an easy way to do that? thanks.

@yugui
Copy link
Member

yugui commented Apr 15, 2016

It is designed to be compatible to standard golang interfaces. So you can combine any middleware for standard libraries.

In particular, Request multiplexer implements the standard HTTP handler interface.
So you can easily combine it with such middleware in Gorilla. https://godoc.org/github.com/gorilla/handlers

@yugui yugui closed this as completed Apr 15, 2016
@liaoliaopro
Copy link
Author

@yugui That help a lot. Great thanks!

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

No branches or pull requests

2 participants