2022-06-21 17:19:12 +05:30
= gitlab_ui_form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-protected-paths-settings'), html: { class: 'fieldset-form' } do |f|
2022-07-23 23:45:48 +05:30
= form_errors(@application_setting, pajamas_alert: true)
2019-12-21 20:55:43 +05:30
%fieldset
.form-group
2022-06-21 17:19:12 +05:30
= f.gitlab_ui_checkbox_component :throttle_protected_paths_enabled,
_('Enable rate limiting for POST requests to the specified paths'),
help_text: _('Helps reduce request volume for protected paths.')
2019-12-21 20:55:43 +05:30
.form-group
2021-12-11 22:18:48 +05:30
= f.label :throttle_protected_paths_requests_per_period, 'Maximum requests per period per user', class: 'label-bold'
2021-03-11 19:13:27 +05:30
= f.number_field :throttle_protected_paths_requests_per_period, class: 'form-control gl-form-input'
2019-12-21 20:55:43 +05:30
.form-group
2021-12-11 22:18:48 +05:30
= f.label :throttle_protected_paths_period_in_seconds, 'Rate limit period (in seconds)', class: 'label-bold'
2021-03-11 19:13:27 +05:30
= f.number_field :throttle_protected_paths_period_in_seconds, class: 'form-control gl-form-input'
2019-12-21 20:55:43 +05:30
.form-group
= f.label :protected_paths, class: 'label-bold' do
2021-12-11 22:18:48 +05:30
= _('Paths to protect with rate limiting')
= f.text_area :protected_paths_raw, placeholder: '/users/sign_in,/users/password', class: 'form-control gl-form-input', rows: 10
%span.form-text.text-muted
2019-12-21 20:55:43 +05:30
- relative_url_link = 'https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-a-relative-url-for-gitlab'
- relative_url_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: relative_url_link }
2021-12-11 22:18:48 +05:30
= _('All paths are relative to the GitLab URL. Do not include %{relative_url_link_start}relative URLs%{relative_url_link_end}.').html_safe % { relative_url_link_start: relative_url_link_start, relative_url_link_end: '</a>'.html_safe }
2019-12-21 20:55:43 +05:30
2021-11-11 11:23:49 +05:30
= f.submit _('Save changes'), class: 'gl-button btn btn-confirm'