Skip to content

Commit

Permalink
Merge pull request #241 from Fenny/master
Browse files Browse the repository at this point in the history
v1.8.41
  • Loading branch information
Fenny authored Mar 23, 2020
2 parents 9f2b087 + e384442 commit 0b64373
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion application.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,21 @@ type (
// Folder containing template files
TemplateFolder string `default:""`
// Template engine: html, amber, handlebars , mustache or pug
TemplateEngine func(raw string, bind interface{}) (string, error) `default:""`
TemplateEngine func(raw string, bind interface{}) (string, error) `default:"nil"`
// Extension for the template files
TemplateExtension string `default:""`
// ReadTimeout is the amount of time allowed to read the full request including body.
// The connection's read deadline is reset when the connection opens, or for
// keep-alive connections after the first byte has been read.
// Default timeout is unlimited.
ReadTimeout time.Duration
// WriteTimeout is the maximum duration before timing out writes of the response.
// It is reset after the request handler has returned.
// Default timeout is unlimited.
WriteTimeout time.Duration
// The maximum amount of time to wait for the next request when keep-alive is enabled.
// If IdleTimeout is zero, the value of ReadTimeout is used.
IdleTimeout time.Duration
}
)

Expand Down Expand Up @@ -503,6 +515,9 @@ func (app *App) newServer() *fasthttp.Server {
Name: app.Settings.ServerHeader,
MaxRequestBodySize: app.Settings.BodyLimit,
NoDefaultServerHeader: app.Settings.ServerHeader == "",
ReadTimeout: app.Settings.ReadTimeout,
WriteTimeout: app.Settings.WriteTimeout,
IdleTimeout: app.Settings.IdleTimeout,
Logger: &customLogger{},
LogAllErrors: false,
ErrorHandler: func(ctx *fasthttp.RequestCtx, err error) {
Expand Down

0 comments on commit 0b64373

Please sign in to comment.