Skip to content

Instantly share code, notes, and snippets.

@wuputah
Last active April 28, 2019 22:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wuputah/5534428 to your computer and use it in GitHub Desktop.
Save wuputah/5534428 to your computer and use it in GitHub Desktop.
require 'my_bouncer'
require 'my_app'
use MyBouncer
run MyApp
require 'heroku/bouncer'
class MyBouncer < Heroku::Bouncer
def call(env)
# dont protect routes that have bananas
if env['PATH_INFO'] =~ /bananas/
@app.call(env)
# normal behavior otherwise
else
super
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment