From 584d295c25697c19ffd369d22281f7d53a139f18 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 20 Jan 2025 10:24:23 +0100 Subject: feat: allow HTTP request logging to be disabled --- internal/config/default.go | 1 + internal/config/structs.go | 1 + 2 files changed, 2 insertions(+) (limited to 'internal/config') diff --git a/internal/config/default.go b/internal/config/default.go index 5202678..752d4e3 100644 --- a/internal/config/default.go +++ b/internal/config/default.go @@ -45,6 +45,7 @@ var DefaultConfig = Config{ "x-content-type-options": "nosniff", "x-frame-options": "DENY", }, + LogRequests: true, }, Importer: &Importer{ LowMemory: false, diff --git a/internal/config/structs.go b/internal/config/structs.go index e73425b..8c69733 100644 --- a/internal/config/structs.go +++ b/internal/config/structs.go @@ -25,6 +25,7 @@ type Web struct { Environment string `comment:"Affects logging parameters. One of 'development' or 'production'"` ExtraHeadHTML string `comment:"Content to add to HTML . Can be used to override styling, add scripts, etc."` Headers map[string]string `comment:"Extra headers to send with HTTP requests"` + LogRequests bool `comment:"Whether to log incoming HTTP requests"` } type Importer struct { -- cgit 1.4.1