mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 15:30:36 +01:00
Fires 404 HTTP Code when use gRPC strict mode
This commit is contained in:
parent
028ee70d4a
commit
30e31e546f
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user