diff --git a/api/v1alpha1/endpointmonitor_types.go b/api/v1alpha1/endpointmonitor_types.go index 1f82fa91..887c0340 100644 --- a/api/v1alpha1/endpointmonitor_types.go +++ b/api/v1alpha1/endpointmonitor_types.go @@ -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 diff --git a/pkg/monitors/statuscake/statuscake-monitor.go b/pkg/monitors/statuscake/statuscake-monitor.go index 9e6f5948..ffea6a9c 100644 --- a/pkg/monitors/statuscake/statuscake-monitor.go +++ b/pkg/monitors/statuscake/statuscake-monitor.go @@ -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 }