ssl_enforcer 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/ssl_enforcer.rb +8 -1
- data/ssl_enforcer.gemspec +3 -3
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/lib/ssl_enforcer.rb
CHANGED
@@ -26,7 +26,14 @@ class SSLEnforcer
|
|
26
26
|
tld = get_top_level_domain(env["SERVER_NAME"])
|
27
27
|
subdomain = get_subdomain(env["SERVER_NAME"], tld)
|
28
28
|
scheme = env["rack.url_scheme"]
|
29
|
-
|
29
|
+
|
30
|
+
# If the subdomain is in the list of HTTPS enforced subs, check for HTTPS
|
31
|
+
# otherwise, return true
|
32
|
+
if @subdoamins.index(subdomain).nil?
|
33
|
+
return true
|
34
|
+
else
|
35
|
+
return scheme == "https"
|
36
|
+
end
|
30
37
|
end
|
31
38
|
|
32
39
|
# return the subdomain regardless of how many levels deep it is
|
data/ssl_enforcer.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "ssl_enforcer"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["JD Hendrickson"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-04-09"
|
13
13
|
s.description = "Simple Rack middleware for forcing SSL on specific subdomains of an application."
|
14
14
|
s.email = "jd@digitalopera.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -33,7 +33,7 @@ Gem::Specification.new do |s|
|
|
33
33
|
s.homepage = "http://github.com/noiseunion/ssl_enforcer"
|
34
34
|
s.licenses = ["MIT"]
|
35
35
|
s.require_paths = ["lib"]
|
36
|
-
s.rubygems_version = "1.8.
|
36
|
+
s.rubygems_version = "1.8.21"
|
37
37
|
s.summary = "Force SSL for specific subdomains of your application"
|
38
38
|
|
39
39
|
if s.respond_to? :specification_version then
|
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.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-04-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -110,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
110
110
|
version: '0'
|
111
111
|
segments:
|
112
112
|
- 0
|
113
|
-
hash:
|
113
|
+
hash: 2420929676221335972
|
114
114
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
115
|
none: false
|
116
116
|
requirements:
|
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
119
|
version: '0'
|
120
120
|
requirements: []
|
121
121
|
rubyforge_project:
|
122
|
-
rubygems_version: 1.8.
|
122
|
+
rubygems_version: 1.8.21
|
123
123
|
signing_key:
|
124
124
|
specification_version: 3
|
125
125
|
summary: Force SSL for specific subdomains of your application
|