rack-private 0.1.4 → 0.1.5
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/private.rb +2 -1
- data/lib/rack/private/version.rb +1 -1
- metadata +3 -3
data/lib/rack/private.rb
CHANGED
|
@@ -15,7 +15,8 @@ module Rack
|
|
|
15
15
|
# If post method check :code_param value
|
|
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
|
+
[307, { 'Content-Type' => 'text/html', 'Location' => '/' }, [body]] # Redirect if code is valid
|
|
19
20
|
else
|
|
20
21
|
render_private_form
|
|
21
22
|
end
|
data/lib/rack/private/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rack-private
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 17
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 0.1.
|
|
9
|
+
- 5
|
|
10
|
+
version: 0.1.5
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Thibaud Guillaume-Gentil
|