mirror of
https://github.com/kataras/iris.git
synced 2025-03-15 17:36:29 +01: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:
commit
9821cbe6d8
|
@ -47,7 +47,14 @@ func (g GRPC) Apply(c *ControllerActivator) {
|
||||||
return
|
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()
|
ctx.Next()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user