def extract_auth_vars(request):
 if request.META.get('HTTP_X_SENTRY_AUTH', '').startswith('Sentry'):
  return request.META['HTTP_X_SENTRY_AUTH']
 elif request.META.get('HTTP_AUTHORIZATION', '').startswith('Sentry'):
  return request.META['HTTP_AUTHORIZATION']
 else:
  args = [('%s=%s' % i) for i in request.GET.items() if (i[0].startswith('sentry_') and (i[0] != 'sentry_data'))]
  if args:
   return ('Sentry %s' % ', '.join(args))
 return None

def extract_auth_vars ( request ) : if request . META . get ( 'HTTP_X_SENTRY_AUTH' , '' ) . startswith ( 'Sentry' ) : return request . META [ 'HTTP_X_SENTRY_AUTH' ] elif request . META . get ( 'HTTP_AUTHORIZATION' , '' ) . startswith ( 'Sentry' ) : return request . META [ 'HTTP_AUTHORIZATION' ] else : args = [ ( '%s=%s' % i ) for i in request . GET . items ( ) if ( i [ 0 ] . startswith ( 'sentry_' ) and ( i [ 0 ] != 'sentry_data' ) ) ] if args : return ( 'Sentry %s' % ', ' . join ( args ) ) return None
raven-js will pass both authorization and x-sentry-auth depending on the browser and server configurations .