Created
August 11, 2010 16:33
-
-
Save jkraemer/519273 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
# 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