Rack Attack whitelist


We are using Gitlab installed on the external server with AD authorization. Sometimes our office IP falls to the ban list and I have to delete record from the redis.
I tried to add rack_attack_git_basic_auth configuration to gitlab.rb with our office IP in ip_whitelist
but after gitlab reconfiguration and restart, authorization breaks with error 500

git clone https://user@gitlab.example.com/projectj/repository.git
Cloning into 'repository'...
Password for 'https://user@gitlab.example.com': 
fatal: unable to access 'https://user@gitlab.example.com/projectj/repository.git/': The requested URL returned error: 500

What am I doing wrong? How to enable whitelisting correctly?

GitLab 9.2.5
GitLab Shell 5.0.4
GitLab Workhorse v2.0.0
GitLab API v4
Git 2.11.1
Ruby 2.3.3p222
Rails 4.2.8
postgresql 9.6.1