1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-09 13:05:56 +00:00

Merge pull request #1948 from trungdlp-wolffun/feature/fire_notfound_strict_mode

Fires 404 HTTP Code when gRPC strict mode enabled
This commit is contained in:
Gerasimos (Makis) Maropoulos
2022-08-15 13:28:44 +03:00
committed by GitHub

View File

@@ -47,7 +47,14 @@ func (g GRPC) Apply(c *ControllerActivator) {
return
}
// If strict was false, allow common HTTP clients, consumes and produces JSON.
// If strict was true fires 404 on common HTTP clients.
if g.Strict {
ctx.NotFound()
ctx.StopExecution()
return
}
// Allow common HTTP clients, consumes and produces JSON.
ctx.Next()
}