Commit 7c80aae3 authored by iv's avatar iv

gitlab: Merge in upstream config updates

This does almost (*) only pure merge. We will slaposify / adjust config
and corresponding md5sum in the following patches.

gitlab_registry_http_config are put in comment

Conflicts:
	software/gitlab/template/gitlab.yml.in
	software/gitlab/template/nginx.conf.in
	software/gitlab/template/rack_attack.rb.in
	software/gitlab/template/smtp_settings.rb.erb
parents 1718eed3 5e227fdb
......@@ -145,6 +145,16 @@ production: &base
storage_path: <%= @lfs_storage_path %>
#}
## Container Registry
registry:
enabled: <%= @registry_enabled %>
host: <%= @registry_host %>
port: <%= @registry_port %>
api_url: <%= @registry_api_url %> # internal address to the registry, will be used by GitLab to directly communicate with API
path: <%= @registry_path %>
key: <%= @registry_key_path %>
issuer: <%= @registry_issuer %>
{# we do not support Pages
## GitLab Pages (EE only)
pages:
......
......@@ -24,9 +24,10 @@ paths_to_be_protected = [
# Create one big regular expression that matches strings starting with any of
# the paths_to_be_protected.
paths_regex = Regexp.union(paths_to_be_protected.map { |path| /\A#{Regexp.escape(path)}/ })
rack_attack_enabled = Gitlab.config.rack_attack.git_basic_auth['enabled']
unless Rails.env.test?
Rack::Attack.throttle('protected paths', limit: {{ cfg('rate_limit_requests_per_period') }}, period: {{ cfg('rate_limit_period') }}.seconds) do |req|
unless Rails.env.test? || !rack_attack_enabled
Rack::Attack.throttle('protected paths', limit: <%= @rate_limit_requests_per_period %>, period: <%= @rate_limit_period %>.seconds) do |req|
if req.post? && req.path =~ paths_regex
req.ip
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment