mirror of
https://github.com/versity/versitygw.git
synced 2026-05-02 10:15:44 +00:00
Merge pull request #1494 from siomporas/fix/add-keepalive-option
fix: add keeplive option (CLI and env var)
This commit is contained in:
@@ -54,6 +54,7 @@ var (
|
||||
healthPath string
|
||||
virtualDomain string
|
||||
debug bool
|
||||
keepAlive bool
|
||||
pprof string
|
||||
quiet bool
|
||||
readonly bool
|
||||
@@ -223,6 +224,12 @@ func initFlags() []cli.Flag {
|
||||
EnvVars: []string{"VGW_PPROF"},
|
||||
Destination: &pprof,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "keep-alive",
|
||||
Usage: "enable keep-alive connections (for finnicky clients)",
|
||||
EnvVars: []string{"VGW_KEEP_ALIVE"},
|
||||
Destination: &keepAlive,
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "quiet",
|
||||
Usage: "silence stdout request logging output",
|
||||
@@ -604,7 +611,7 @@ func runGateway(ctx context.Context, be backend.Backend) error {
|
||||
AppName: "versitygw",
|
||||
ServerHeader: "VERSITYGW",
|
||||
StreamRequestBody: true,
|
||||
DisableKeepalive: true,
|
||||
DisableKeepalive: !keepAlive,
|
||||
Network: fiber.NetworkTCP,
|
||||
DisableStartupMessage: true,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user