Skip to content

Instantly share code, notes, and snippets.

@jkraemer jkraemer/config.ru
Created Aug 11, 2010

Embed
What would you like to do?
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
require ::File.expand_path('../lib/devise_basic_auth_fix', __FILE__)
use DeviseBasicAuthFix
run MyApp::Application
##
# Rack middleware for removing basic auth headers from requests
# see http://github.com/plataformatec/devise/issues/issue/178 for an explanation of why and when this is needed...
#
# === Examples:
#
# use DeviseBasicAuthFix
#
#
class DeviseBasicAuthFix
def initialize(app)
@app = app
end
def call(env)
env['HTTP_AUTHORIZATION'] = nil
@app.call(env)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.