rack-simple-auth 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/rack-simple-auth.rb +2 -3
- metadata +1 -1
data/lib/rack-simple-auth.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
require
|
2
|
-
require 'rack/request'
|
1
|
+
%w[ rubygems rack rack/request openssl ].each { |s| require s }
|
3
2
|
|
4
3
|
module Rack
|
5
4
|
class SimpleAuth
|
@@ -16,7 +15,7 @@ module Rack
|
|
16
15
|
if authenticated? request.cookies
|
17
16
|
@app.call(env)
|
18
17
|
else
|
19
|
-
[302, {'Location' => "#{@login_url}?return_to=#{request.url}"}, ['You must be logged in to see this.']]
|
18
|
+
[302, {'Content-Type' => 'text/plain', 'Location' => "#{@login_url}?return_to=#{request.url}"}, ['You must be logged in to see this.']]
|
20
19
|
end
|
21
20
|
end
|
22
21
|
|