Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions internal/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion internal/destregistry/providers/destwebhook/destwebhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}

Expand Down