BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
732b1226
Commit
732b1226
authored
Oct 06, 2017
by
Michael Kozono
Committed by
Francisco Lopez
Nov 17, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add throttle application settings
parent
10c216da
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
0 deletions
+56
-0
application_setting.rb
app/models/application_setting.rb
+9
-0
20171006220837_add_global_rate_limits_to_application_settings.rb
...6220837_add_global_rate_limits_to_application_settings.rb
+38
-0
schema.rb
db/schema.rb
+9
-0
No files found.
app/models/application_setting.rb
View file @
732b1226
...
...
@@ -295,6 +295,15 @@ class ApplicationSetting < ActiveRecord::Base
sign_in_text:
nil
,
signup_enabled:
Settings
.
gitlab
[
'signup_enabled'
],
terminal_max_session_time:
0
,
throttle_unauthenticated_enabled:
false
,
throttle_unauthenticated_requests_per_period:
3600
,
throttle_unauthenticated_period_in_seconds:
3600
,
throttle_authenticated_web_enabled:
false
,
throttle_authenticated_web_requests_per_period:
7200
,
throttle_authenticated_web_period_in_seconds:
3600
,
throttle_authenticated_api_enabled:
false
,
throttle_authenticated_api_requests_per_period:
7200
,
throttle_authenticated_api_period_in_seconds:
3600
,
two_factor_grace_period:
48
,
user_default_external:
false
,
polling_interval_multiplier:
1
,
...
...
db/migrate/20171006220837_add_global_rate_limits_to_application_settings.rb
0 → 100644
View file @
732b1226
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class
AddGlobalRateLimitsToApplicationSettings
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_column_with_default
:application_settings
,
:throttle_unauthenticated_enabled
,
:boolean
,
default:
false
,
allow_null:
false
add_column_with_default
:application_settings
,
:throttle_unauthenticated_requests_per_period
,
:integer
,
default:
3600
,
allow_null:
false
add_column_with_default
:application_settings
,
:throttle_unauthenticated_period_in_seconds
,
:integer
,
default:
3600
,
allow_null:
false
add_column_with_default
:application_settings
,
:throttle_authenticated_api_enabled
,
:boolean
,
default:
false
,
allow_null:
false
add_column_with_default
:application_settings
,
:throttle_authenticated_api_requests_per_period
,
:integer
,
default:
7200
,
allow_null:
false
add_column_with_default
:application_settings
,
:throttle_authenticated_api_period_in_seconds
,
:integer
,
default:
3600
,
allow_null:
false
add_column_with_default
:application_settings
,
:throttle_authenticated_web_enabled
,
:boolean
,
default:
false
,
allow_null:
false
add_column_with_default
:application_settings
,
:throttle_authenticated_web_requests_per_period
,
:integer
,
default:
7200
,
allow_null:
false
add_column_with_default
:application_settings
,
:throttle_authenticated_web_period_in_seconds
,
:integer
,
default:
3600
,
allow_null:
false
end
def
down
remove_column
:application_settings
,
:throttle_authenticated_web_period_in_seconds
remove_column
:application_settings
,
:throttle_authenticated_web_requests_per_period
remove_column
:application_settings
,
:throttle_authenticated_web_enabled
remove_column
:application_settings
,
:throttle_authenticated_api_period_in_seconds
remove_column
:application_settings
,
:throttle_authenticated_api_requests_per_period
remove_column
:application_settings
,
:throttle_authenticated_api_enabled
remove_column
:application_settings
,
:throttle_unauthenticated_period_in_seconds
remove_column
:application_settings
,
:throttle_unauthenticated_requests_per_period
remove_column
:application_settings
,
:throttle_unauthenticated_enabled
end
end
db/schema.rb
View file @
732b1226
...
...
@@ -140,6 +140,15 @@ ActiveRecord::Schema.define(version: 20171106180641) do
t
.
integer
"circuitbreaker_storage_timeout"
,
default:
30
t
.
integer
"circuitbreaker_access_retries"
,
default:
3
t
.
integer
"circuitbreaker_backoff_threshold"
,
default:
80
t
.
boolean
"throttle_unauthenticated_enabled"
,
default:
false
,
null:
false
t
.
integer
"throttle_unauthenticated_requests_per_period"
,
default:
3600
,
null:
false
t
.
integer
"throttle_unauthenticated_period_in_seconds"
,
default:
3600
,
null:
false
t
.
boolean
"throttle_authenticated_api_enabled"
,
default:
false
,
null:
false
t
.
integer
"throttle_authenticated_api_requests_per_period"
,
default:
7200
,
null:
false
t
.
integer
"throttle_authenticated_api_period_in_seconds"
,
default:
3600
,
null:
false
t
.
boolean
"throttle_authenticated_web_enabled"
,
default:
false
,
null:
false
t
.
integer
"throttle_authenticated_web_requests_per_period"
,
default:
7200
,
null:
false
t
.
integer
"throttle_authenticated_web_period_in_seconds"
,
default:
3600
,
null:
false
end
create_table
"audit_events"
,
force: :cascade
do
|
t
|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment