Permalink
Browse files

add logging on auth failure

Change-Id: I66247274b52a5e3da55470f9dc9677b1541a5059
  • Loading branch information...
1 parent 9f5ca86 commit 5531c9756dee1c886bc347b8037af24bef4a1f68 Patrick Bozeman committed Oct 21, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/caldecott/server/http_tunnel.rb
@@ -163,7 +163,11 @@ def tunnel_from_id(tun_id)
end
before do
- not_found if env['HTTP_AUTH_TOKEN'] != settings.auth_token
+ if env['HTTP_AUTH_TOKEN'] != settings.auth_token
+ log = SessionLogger.new("server", STDOUT)
+ log.debug "#{request.request_method} #{request.url} AUTH FAILURE #{env.inspect}"
+ not_found
+ end
end
get '/' do

0 comments on commit 5531c97

Please sign in to comment.