rack-private 0.1.6 → 0.1.7
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/README.markdown +1 -1
- data/lib/rack/private.rb +1 -1
- data/lib/rack/private/version.rb +1 -1
- metadata +1 -1
data/README.markdown
CHANGED
@@ -28,7 +28,7 @@ And provide your own template.
|
|
28
28
|
use Rack::Private :code => 'secret', :template_path => Rails.root.join("app/templates/private.html")
|
29
29
|
```
|
30
30
|
|
31
|
-
|
31
|
+
### Note on Patches/Pull Requests ###
|
32
32
|
|
33
33
|
* Fork the project.
|
34
34
|
* Make your feature addition or bug fix.
|
data/lib/rack/private.rb
CHANGED
@@ -16,7 +16,7 @@ module Rack
|
|
16
16
|
if request.post? && code_valid?(request.params["private_code"])
|
17
17
|
request.session[:private_code] = request.params["private_code"]
|
18
18
|
body = "<html><body>Secret code is valid.</body></html>"
|
19
|
-
[
|
19
|
+
[303, { 'Content-Type' => 'text/html', 'Location' => '/' }, [body]] # Redirect if code is valid
|
20
20
|
else
|
21
21
|
render_private_form
|
22
22
|
end
|
data/lib/rack/private/version.rb
CHANGED