Skip to content

Commit 8de80d3

Browse files
committed
adding ability to lock path
1 parent 41c5ff7 commit 8de80d3

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

outputs.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,14 @@ type Output struct {
2424
Headers map[string][]string `json:"headers"`
2525
Destination string `json:"destination"`
2626
Disabled bool `json:"disabled"` // Allows disabling forwarding to specific output
27-
Internal bool `json:"internal"`
28-
Timeout int `json:"timeout"` // Destination response timeout
29-
Description string `json:"description"`
27+
// LockPath ensures that the request path cannot be changed from what is
28+
// specified in the destination. For example if request is coming to /v1/webhooks/xxx/github-jenkins,
29+
// with lock path 'false' and destination 'http://localhost:8080' it would go to http://localhost:8080/github-jenkins.
30+
// However, with lock path 'true', it will be sent to 'http://localhost:8080'
31+
LockPath bool `json:"lock_path"`
32+
Internal bool `json:"internal"`
33+
Timeout int `json:"timeout"` // Destination response timeout
34+
Description string `json:"description"`
3035
}
3136

3237
// MarshalJSON helper to change time into unix

0 commit comments

Comments
 (0)