diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2019-07-24 19:49:31 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-07-24 19:49:31 +0000 |
commit | 3cefc5d7df09dbc21cd9c892bc6c62b5b583ca6a (patch) | |
tree | 2e996ca71e4e16c74f1be94d1f7143ac3e49dad6 /app/views/admin | |
parent | b70dbabb6373e7624e3bcb7a6d78049621db891c (diff) | |
download | gitlab-ce-3cefc5d7df09dbc21cd9c892bc6c62b5b583ca6a.tar.gz |
Add RateLimiter to RawController
* Limits raw requests to 300 per minute and per raw path.
* Add a new attribute to ApplicationSettings so user can change this
value on their instance.
* Uses Gitlab::ActionRateLimiter to limit the raw requests.
* Add a new method into ActionRateLimiter to log the event into auth.log
Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/48717
Diffstat (limited to 'app/views/admin')
-rw-r--r-- | app/views/admin/application_settings/_performance.html.haml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/views/admin/application_settings/_performance.html.haml b/app/views/admin/application_settings/_performance.html.haml index 7821a83530f..b52171afc69 100644 --- a/app/views/admin/application_settings/_performance.html.haml +++ b/app/views/admin/application_settings/_performance.html.haml @@ -15,4 +15,10 @@ AuthorizedKeysCommand. Click on the help icon for more details. = link_to icon('question-circle'), help_page_path('administration/operations/fast_ssh_key_lookup') + .form-group + = f.label :raw_blob_request_limit, _('Raw blob request rate limit per minute'), class: 'label-bold' + = f.number_field :raw_blob_request_limit, class: 'form-control' + .form-text.text-muted + = _('Highest number of requests per minute for each raw path, default to 300. To disable throttling set to 0.') + = f.submit 'Save changes', class: "btn btn-success" |