Skip to content
This repository

Let exceptions bubble up #3

Merged
merged 1 commit into from about 3 years ago

2 participants

Simon Rozet Corey Donohoe
Simon Rozet
sr commented

disable :raise_errors, blabla

Simon Rozet sr let exceptions bubble up
:punch: sinatra in the throat
125d38b
Corey Donohoe atmos merged commit be1463a into from
Corey Donohoe atmos closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jul 12, 2011
Simon Rozet sr let exceptions bubble up
:punch: sinatra in the throat
125d38b
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 6 additions and 0 deletions. Show diff stats Hide diff stats

  1. +6 0 lib/sinatra/auth/github.rb
6 lib/sinatra/auth/github.rb
@@ -10,6 +10,9 @@ module Github
10 10 # Simple way to serve an image early in the stack and not get blocked by
11 11 # application level before filters
12 12 class AccessDenied < Sinatra::Base
  13 + enable :raise_errors
  14 + disable :show_exceptions
  15 +
13 16 get '/_images/securocat.png' do
14 17 send_file(File.join(File.dirname(__FILE__), "views", "securocat.png"))
15 18 end
@@ -17,6 +20,9 @@ class AccessDenied < Sinatra::Base
17 20
18 21 # The default failure application, this is overridable from the extension config
19 22 class BadAuthentication < Sinatra::Base
  23 + enable :raise_errors
  24 + disable :show_exceptions
  25 +
20 26 helpers do
21 27 def unauthorized_template
22 28 @unauthenticated_template ||= File.read(File.join(File.dirname(__FILE__), "views", "401.html"))

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.