We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49c33d4 commit 0fdc43cCopy full SHA for 0fdc43c
pkg/server/server.go
@@ -31,10 +31,15 @@ func Start(cfg *Config, authChecker auth.Checker) {
31
router := setupRoutes(cfg, authChecker)
32
router.Use(corsHeader(cfg))
33
34
+ writeTimeout := 30 * time.Second
35
+ if cfg.Loki.Timeout.Seconds() > writeTimeout.Seconds() {
36
+ writeTimeout = cfg.Loki.Timeout
37
+ }
38
+
39
httpServer := defaultServer(&http.Server{
40
Handler: router,
41
Addr: fmt.Sprintf(":%d", cfg.Port),
- WriteTimeout: 30 * time.Second,
42
+ WriteTimeout: writeTimeout,
43
})
44
45
if cfg.CertPath != "" && cfg.KeyPath != "" {
0 commit comments