1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 02:17:05 +00:00

Update to 4.5.2

This commit is contained in:
Gerasimos Maropoulos
2016-10-11 22:35:12 +03:00
parent 40b000c20f
commit 9bce4e846a
7 changed files with 121 additions and 15 deletions

View File

@@ -1,15 +1,16 @@
package iris
import (
"github.com/imdario/mergo"
"github.com/kataras/go-options"
"github.com/kataras/go-sessions"
"github.com/valyala/fasthttp"
"io"
"net/url"
"os"
"strconv"
"time"
"github.com/imdario/mergo"
"github.com/kataras/go-options"
"github.com/kataras/go-sessions"
"github.com/valyala/fasthttp"
)
type (
@@ -160,6 +161,10 @@ type Configuration struct {
// Default is false
DisablePathEscape bool
// FireMethodNotAllowed if it's true router checks for StatusMethodNotAllowed(405) and fires the 405 error instead of 404
// Default is false
FireMethodNotAllowed bool
// DisableBanner outputs the iris banner at startup
//
// Default is false
@@ -381,6 +386,14 @@ var (
}
}
// FireMethodNotAllowed if it's true router checks for StatusMethodNotAllowed(405) and fires the 405 error instead of 404
// Default is false
OptionFireMethodNotAllowed = func(val bool) OptionSet {
return func(c *Configuration) {
c.FireMethodNotAllowed = val
}
}
// OptionDisableBanner outputs the iris banner at startup
//
// Default is false
@@ -523,6 +536,7 @@ func DefaultConfiguration() Configuration {
CheckForUpdatesSync: false,
DisablePathCorrection: DefaultDisablePathCorrection,
DisablePathEscape: DefaultDisablePathEscape,
FireMethodNotAllowed: false,
DisableBanner: false,
LoggerOut: DefaultLoggerOut,
LoggerPreffix: DefaultLoggerPreffix,