rack-ssl 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rack-ssl might be problematic. Click here for more details.
- data/lib/rack/ssl.rb +5 -1
- metadata +4 -4
data/lib/rack/ssl.rb
CHANGED
@@ -15,10 +15,14 @@ module Rack
|
|
15
15
|
@hsts = options[:hsts]
|
16
16
|
@hsts = {} if @hsts.nil? || @hsts == true
|
17
17
|
@hsts = self.class.default_hsts_options.merge(@hsts) if @hsts
|
18
|
+
|
19
|
+
@exclude = options[:exclude]
|
18
20
|
end
|
19
21
|
|
20
22
|
def call(env)
|
21
|
-
if
|
23
|
+
if @exclude && @exclude.call(env)
|
24
|
+
@app.call(env)
|
25
|
+
elsif scheme(env) == 'https'
|
22
26
|
status, headers, body = @app.call(env)
|
23
27
|
headers = hsts_headers.merge(headers)
|
24
28
|
flag_cookies_as_secure!(headers)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-ssl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 1.0.0
|
10
|
+
version: 1.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Joshua Peek
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-11-
|
18
|
+
date: 2010-11-08 00:00:00 -06:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|