ssl_enforcer 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,6 +36,7 @@ class SSLEnforcer::Enforcer
36
36
  # http://rack.lighthouseapp.com/projects/22435/tickets/101
37
37
  scheme = (env["SERVER_PORT"] == "443") ? :https : :http
38
38
  scheme = env["HTTP_X_FORWARDED_PROTO"] if env["HTTP_X_FORWARDED_PROTO"]
39
+ scheme = scheme.downcase.to_sym
39
40
 
40
41
  # If the "only" and or "exceptions" options have not been passed, then
41
42
  # we want to force SSL on ALL subdomains
@@ -54,7 +55,7 @@ class SSLEnforcer::Enforcer
54
55
  ## If the option was not passed, then we must assume to change all
55
56
  ## subdomains NOT responded to by @exceptions
56
57
  if @only.empty?
57
- return scheme.downcase.to_sym == :https
58
+ return scheme == :https
58
59
  else
59
60
  return true
60
61
  end
@@ -1,3 +1,3 @@
1
1
  module SSLEnforcer
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ssl_enforcer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: