BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/296423
Change subject: striker: rate limit support ...................................................................... striker: rate limit support Change-Id: I5fad533807a607d3fb76a8be80351444c95a6ea8 --- M puppet/hieradata/environment/labs.yaml M puppet/modules/role/manifests/striker.pp M puppet/modules/role/templates/striker/striker.ini.erb 3 files changed, 13 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/23/296423/1 diff --git a/puppet/hieradata/environment/labs.yaml b/puppet/hieradata/environment/labs.yaml index 9cef5e3..c733f6c 100644 --- a/puppet/hieradata/environment/labs.yaml +++ b/puppet/hieradata/environment/labs.yaml @@ -4,3 +4,5 @@ mwv::tld: '-%{::vmhost}.wmflabs.org' role::mediawiki::hostname: "%{::vmhost}.wmflabs.org" mediawiki::multiwiki::base_domain: "-%{::vmhost}.wmflabs.org" + +role::striker::xff_trusted_hosts: ['10.68.21.68'] diff --git a/puppet/modules/role/manifests/striker.pp b/puppet/modules/role/manifests/striker.pp index 6195d96..ac36f88 100644 --- a/puppet/modules/role/manifests/striker.pp +++ b/puppet/modules/role/manifests/striker.pp @@ -43,6 +43,9 @@ # [*phabricator_repo_admin_group*] # PHID of git repository administrators group # +# [*xff_trusted_hosts*] +# Upstream proxies to truse for X-Forwared-For data +# class role::striker( $deploy_dir, $log_dir, @@ -56,11 +59,13 @@ $phabricator_user, $phabricator_token, $phabricator_repo_admin_group, + $xff_trusted_hosts = undef, ){ require ::role::mediawiki include ::role::oauth include ::role::ldapauth include ::apache::mod::wsgi + include ::memcached file { "${log_dir}/striker": ensure => 'directory', diff --git a/puppet/modules/role/templates/striker/striker.ini.erb b/puppet/modules/role/templates/striker/striker.ini.erb index efc194c..bcac3c7 100644 --- a/puppet/modules/role/templates/striker/striker.ini.erb +++ b/puppet/modules/role/templates/striker/striker.ini.erb @@ -41,6 +41,12 @@ HOST = 127.0.0.1 PORT = 3306 +<% if @xff_trusted_hosts %> +[xff] +USE_XFF_HEADER = true +TRUSTED_PROXY_LIST = <%= @xff_trusted_hosts.join(' ') %> +<% end %> + [logging] HANDLERS = file LEVEL = DEBUG -- To view, visit https://gerrit.wikimedia.org/r/296423 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5fad533807a607d3fb76a8be80351444c95a6ea8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: BryanDavis <bda...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits