summaryrefslogtreecommitdiff
path: root/app/models/hooks
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-07 18:09:27 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-07 18:09:27 +0000
commit5cda8c8a420399ca9687c4a981fefd50ce5a1fdd (patch)
tree6050d7517a36798c9586e153df20a0696c5fcd4f /app/models/hooks
parent7bbc731c75d0b8bf7c74ba77d521266d2ed0a1fc (diff)
downloadgitlab-ce-5cda8c8a420399ca9687c4a981fefd50ce5a1fdd.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/hooks')
-rw-r--r--app/models/hooks/web_hook_log.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/hooks/web_hook_log.rb b/app/models/hooks/web_hook_log.rb
index a95dd0473b6..2f03b3591cf 100644
--- a/app/models/hooks/web_hook_log.rb
+++ b/app/models/hooks/web_hook_log.rb
@@ -7,6 +7,8 @@ class WebHookLog < ApplicationRecord
include CreatedAtFilterable
include PartitionedTable
+ OVERSIZE_REQUEST_DATA = { 'oversize' => true }.freeze
+
self.primary_key = :id
partitioned_by :created_at, strategy: :monthly, retain_for: 3.months
@@ -41,6 +43,10 @@ class WebHookLog < ApplicationRecord
response_status == WebHookService::InternalErrorResponse::ERROR_MESSAGE
end
+ def oversize?
+ request_data == OVERSIZE_REQUEST_DATA
+ end
+
private
def obfuscate_basic_auth