Gitlab Rack Attack Insallation

亡梦爱人 提交于 2019-12-22 10:38:52

问题


I was installing gitlab and followed all the instructions of the installation guide of Gitlab. Everything works fine but then at Step "Initialize Database and Activate Advanced Features" it failed!

https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md

I got this error Message.

rake aborted!
uninitialized constant Rack::Attack
/home/git/gitlab/config/application.rb:82:in `<class:Application>'
/home/git/gitlab/config/application.rb:13:in `<module:Gitlab>'
/home/git/gitlab/config/application.rb:12:in `<top (required)>'
/home/git/gitlab/Rakefile:5:in `require'
/home/git/gitlab/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)

In the application.rb file I uncommented the line as it says in the instruction.

# Enable rack attack middleware
# Find and uncomment the line 'config.middleware.use Rack::Attack' 

回答1:


Note that, from issue 5245:

Rack Attack is new for 6-2 stable which will be released on 22rd of october.

That being said, read "doc/security/rack_attack.md":

uncomment the line config.middleware.use Rack::Attack in the config/application.rb find isn't enough.

The other steps are:

  • Rename config/initializers/rack_attack.rb.example to config/initializers/rack_attack.rb
  • Review the paths_to_be_protected and add any other path you need protecting
  • Restart GitLab instance


来源:https://stackoverflow.com/questions/19391468/gitlab-rack-attack-insallation

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!