rack-private 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
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
- [301, { 'Content-Type' => 'text/plain', 'Location' => '/' }, ['Secret code is valid.']] # Redirect if code is valid
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
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  class Private
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
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: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
9
+ - 5
10
+ version: 0.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Thibaud Guillaume-Gentil