diff options
author | Stan Hu <stanhu@gmail.com> | 2019-08-20 18:12:28 +0000 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2019-08-20 18:12:28 +0000 |
commit | e632ae80845f849f93e4d85ef9f836a4792844c9 (patch) | |
tree | 5715c29c7a6b6ed93e16f8ab0f59b229af3ba646 /config | |
parent | a493cccdda6d2ab0fd21e60a144504a6cf6747ee (diff) | |
download | gitlab-ce-e632ae80845f849f93e4d85ef9f836a4792844c9.tar.gz |
Standardize remote_ip and path keys for auth.log and api_json.log
Current `auth.log` uses `fullpath` and `ip`, while `api_json.log` uses
`remote_ip` and `path` for the same fields. Let's standardize these
namings to make it easier for people working with the data.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66167
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/rack_attack_logging.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config/initializers/rack_attack_logging.rb b/config/initializers/rack_attack_logging.rb index 7eb34bd69e5..b43fff24bb0 100644 --- a/config/initializers/rack_attack_logging.rb +++ b/config/initializers/rack_attack_logging.rb @@ -7,9 +7,9 @@ ActiveSupport::Notifications.subscribe('rack.attack') do |name, start, finish, r rack_attack_info = { message: 'Rack_Attack', env: req.env['rack.attack.match_type'], - ip: req.ip, + remote_ip: req.ip, request_method: req.request_method, - fullpath: req.fullpath + path: req.fullpath } if %w(throttle_authenticated_api throttle_authenticated_web).include? req.env['rack.attack.matched'] |