mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Disable webhooks on 410 and 404 HTTP responses (#7392)
FIX: Disable webhooks on 410 and 404 HTTP responses (#7392)
This commit is contained in:
@@ -599,6 +599,19 @@ class StaffActionLogger
|
||||
))
|
||||
end
|
||||
|
||||
def log_web_hook_deactivate(web_hook, response_http_status, opts = {})
|
||||
context = [
|
||||
"webhook_id: #{web_hook.id}",
|
||||
"webhook_response_status: #{response_http_status}"
|
||||
]
|
||||
|
||||
UserHistory.create!(params.merge(
|
||||
action: UserHistory.actions[:web_hook_deactivate],
|
||||
context: context,
|
||||
details: I18n.t('staff_action_logs.webhook_deactivation_reason', status: response_http_status)
|
||||
))
|
||||
end
|
||||
|
||||
def log_embeddable_host(embeddable_host, action, opts = {})
|
||||
old_values, new_values = get_changes(opts[:changes])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user