fix: do not cache api (incl. grpc) and http errors (#2088)

* fix: add cache-control headers (no-store, no-cache) on grpc (for grpc-web)

* fix: do not cache api response (incl. grpc) and http errors
This commit is contained in:
Livio Amstutz
2021-07-28 13:19:44 +02:00
committed by GitHub
parent 451afada90
commit bd8133aedd
4 changed files with 53 additions and 3 deletions

View File

@@ -134,7 +134,6 @@ func createDialOptions(g Gateway) []grpc.DialOption {
func addInterceptors(handler http.Handler, g Gateway) http.Handler {
handler = http_mw.DefaultMetricsHandler(handler)
handler = http_mw.DefaultTelemetryHandler(handler)
handler = http_mw.NoCacheInterceptor(handler)
if interceptor, ok := g.(grpcGatewayCustomInterceptor); ok {
handler = interceptor.GatewayHTTPInterceptor(handler)
}