Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Allow buffalo to accept preconfigured http.Server(s) #1015

Closed
bjwschaap opened this issue Apr 9, 2018 · 0 comments
Closed

Allow buffalo to accept preconfigured http.Server(s) #1015

bjwschaap opened this issue Apr 9, 2018 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bjwschaap
Copy link

bjwschaap commented Apr 9, 2018

In order to be able to set custom properties for a http.Server (e.g. TLS options, Read-, Write- and IdleTimeout), it would be nice for the buffalo App to accept one or more preconfigured http.Server instances, instead of creating a default one.

e.g.:

srv := &http.Server{
    ReadTimeout:  5 * time.Second,
    WriteTimeout: 10 * time.Second,
    IdleTimeout:  120 * time.Second,
    TLSConfig:    &tls.Config{
        PreferServerCipherSuites: true,
        CurvePreferences: []tls.CurveID{
            tls.CurveP256,
            tls.X25519, // Go 1.8 only
        },
    },
}

app := actions.App()
if err := app.Serve(srv); err != nil {
    log.Fatal(err)
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants