bobthecow / genghis

The single-file MongoDB admin app
http://genghisapp.com
MIT License
1.45k stars 166 forks source link

Easiest way to add security layer to Genghis? #175

Open acoyfellow opened 10 years ago

acoyfellow commented 10 years ago

I figured this would be somewhat simple, but I can't find a elegant solution to simply password protect a port that genghis is running on for example (MEAN stack).

Love the work put into Genghis-- thank you very much!

bobthecow commented 10 years ago

Are you running the PHP or Ruby backend for Genghis? If Ruby, you can easily use HTTP basic auth via Rack. Make a config.ru file somewhere:

require 'genghis'

use Rack::Auth::Basic, 'Genghis' do |u, p|
  u == 'admin' && p == 'hunter2'
end

run Genghis::Server

Then start it with rackup.