Add Authentication to Gollum
- Create a Rack
config.ru
like below:
1
2
3
4
5
6
7
8
9
10
11
| require 'rubygems'
require 'gollum/frontend/app'
use Rack::Auth::Basic, "Restricted Area" do |username, password|
[username, password] == ['admin', 'admin']
end
Precious::App.set(:gollum_path, '<repo-path>')
Precious::App.set(:wiki_options, {})
run Precious::App
|