Skip to content

Commit

Permalink
Add user_agent var to statuscake
Browse files Browse the repository at this point in the history
  • Loading branch information
matthijswolters-rl committed Oct 4, 2024
1 parent e4596fb commit 30c9cbb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/v1alpha1/endpointmonitor_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ type StatusCakeConfig struct {
// RawPostData can be used to send parameters within the URL. Changes the request from a GET to a POST
// +optional
RawPostData string `json:"rawPostData,omitempty"`

// UserAgent is used to set a user agent string.
// +optional
UserAgent string `json:"userAgent,omitempty"`
}

// PingdomConfig defines the configuration for Pingdom Monitor Provider
Expand Down
3 changes: 3 additions & 0 deletions pkg/monitors/statuscake/statuscake-monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,9 @@ func buildUpsertForm(m models.Monitor, cgroup string) url.Values {
if providerConfig != nil && len(providerConfig.RawPostData) > 0 {
f.Add("post_raw", providerConfig.RawPostData)
}
if providerConfig != nil && len(providerConfig.UserAgent) > 0 {
f.Add("user_agent", providerConfig.UserAgent)
}
return f
}

Expand Down

0 comments on commit 30c9cbb

Please sign in to comment.