Skip to content

Instantly share code, notes, and snippets.

@brunapereira
Last active December 14, 2019 22:39
Show Gist options
  • Save brunapereira/8fba82681647d8afdbe071b730fc10b9 to your computer and use it in GitHub Desktop.
Save brunapereira/8fba82681647d8afdbe071b730fc10b9 to your computer and use it in GitHub Desktop.
YourRailsApp::Application.routes.draw do
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_SECRET']
true
else
false
end
end
end
mount flipper_auth_app, at: '/flipper'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment