Gitlab机架攻击绝缘 [英] Gitlab Rack Attack Insallation
问题描述
我正在安装gitlab,并按照Gitlab安装指南的所有说明进行操作.一切正常,然后在步骤初始化数据库并激活高级功能" 失败了!
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
我收到此错误消息.
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)
在application.rb文件中,我按照注释中的说明取消了注释.
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'
推荐答案
请注意,来自 issue 5245 :
Rack Attack是6-2稳定版的新增功能,将于10月22日发布.
Rack Attack is new for 6-2 stable which will be released on 22rd of october.
话虽如此,请阅读" doc/security/rack_attack.md
:
That being said, read "doc/security/rack_attack.md
":
取消注释 config/application.rb
config.middleware.use Rack::Attack >查找还不够.
其他步骤是:
- 将
config/initializers/rack_attack.rb.example
重命名为config/initializers/rack_attack.rb
- 查看
paths_to_be_protected
并添加您需要保护的任何其他路径- 重新启动GitLab实例
- Rename
config/initializers/rack_attack.rb.example
toconfig/initializers/rack_attack.rb
- Review the
paths_to_be_protected
and add any other path you need protecting- Restart GitLab instance
这篇关于Gitlab机架攻击绝缘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!