diff --git a/Makefile b/Makefile index a8638aad..082044f9 100644 --- a/Makefile +++ b/Makefile @@ -59,6 +59,9 @@ up/deps: down/deps: COMPOSE_PROFILES=$$(./build/dev/deps/profiles.sh --all) docker-compose -f build/dev/deps/compose.yml -f build/dev/deps/compose-gui.yml down +nuke/deps: + COMPOSE_PROFILES=$$(docker compose -f build/dev/deps/compose.yml -f build/dev/deps/compose-gui.yml config --profiles | paste -sd, -) docker compose -f build/dev/deps/compose.yml -f build/dev/deps/compose-gui.yml down --volumes --remove-orphans + up/mqs: docker-compose -f build/dev/mqs/compose.yml up -d diff --git a/internal/config/config.go b/internal/config/config.go index 48371ba1..5ed9837c 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -176,7 +176,6 @@ func (c *Config) InitDefaults() { c.Destinations = DestinationsConfig{ MetadataPath: "config/outpost/destinations", Webhook: DestinationWebhookConfig{ - HeaderPrefix: "x-outpost-", SignatureContentTemplate: "{{.Body}}", SignatureHeaderTemplate: "v0={{.Signatures | join \",\"}}", SignatureEncoding: "hex", diff --git a/internal/config/config_test.go b/internal/config/config_test.go index ace80921..4d838909 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -71,7 +71,7 @@ func TestDefaultValues(t *testing.T) { assert.Equal(t, "config/outpost/destinations", cfg.Destinations.MetadataPath) assert.Equal(t, 10, cfg.LogBatchThresholdSeconds) assert.Equal(t, 1000, cfg.LogBatchSize) - assert.Equal(t, "x-outpost-", cfg.Destinations.Webhook.HeaderPrefix) + assert.Equal(t, "", cfg.Destinations.Webhook.HeaderPrefix) } func TestYAMLConfig(t *testing.T) { @@ -328,7 +328,7 @@ func TestDestinationConfig(t *testing.T) { name: "default header prefix", files: map[string][]byte{}, envVars: map[string]string{}, - want: "x-outpost-", + want: "", }, { name: "yaml config header prefix", diff --git a/internal/destregistry/providers/destwebhook/destwebhook.go b/internal/destregistry/providers/destwebhook/destwebhook.go index fff30b2b..96e4d067 100644 --- a/internal/destregistry/providers/destwebhook/destwebhook.go +++ b/internal/destregistry/providers/destwebhook/destwebhook.go @@ -116,7 +116,9 @@ type Option func(*WebhookDestination) // WithHeaderPrefix sets a custom prefix for webhook request headers func WithHeaderPrefix(prefix string) Option { return func(w *WebhookDestination) { - w.headerPrefix = prefix + if prefix != "" { + w.headerPrefix = prefix + } } }