Skip to content

Instantly share code, notes, and snippets.

@subomi
Created February 5, 2019 17:09
Show Gist options
  • Save subomi/cc4db4e3cc9bbeb491f1298d1043d765 to your computer and use it in GitHub Desktop.
Save subomi/cc4db4e3cc9bbeb491f1298d1043d765 to your computer and use it in GitHub Desktop.
# config/routes.rb
flipper_auth_app = Flipper::UI.app(Flipper.instance) do |builder|
builder.use Rack::Auth::Basic do |username, password|
if username == ENV['FLIPPER_USERNAME'] && password == ENV['FLIPPER_PASSWORD']
true
else
false
end
end
end
mount flipper_auth_app, at: '/flipper'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment