mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 02:17:05 +00:00
add context#StatusCodeNotSuccessful for customize even the most customized clients that are not compatible with the standards and fix the SPA if static file serve handlers are passed as its AssetHandler as reported at the chat.iris-go.com
Former-commit-id: ccd0815a09b9305bfbeaad7b46559dd86f34f20b
This commit is contained in:
@@ -64,7 +64,8 @@ func (b *Bootstrapper) SetupWebsockets(endpoint string, onConnection websocket.C
|
||||
})
|
||||
}
|
||||
|
||||
// SetupErrorHandlers prepares the http error handlers (>=400).
|
||||
// SetupErrorHandlers prepares the http error handlers
|
||||
// `(context.StatusCodeNotSuccessful`, which defaults to < 200 || >= 400 but you can change it).
|
||||
func (b *Bootstrapper) SetupErrorHandlers() {
|
||||
b.OnAnyErrorCode(func(ctx iris.Context) {
|
||||
err := iris.Map{
|
||||
|
||||
Reference in New Issue
Block a user