rack-strip-cookies 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rack/strip-cookies/version.rb +1 -1
- data/lib/rack/strip-cookies.rb +6 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8f7845afe771475ad4812a44369964852af03d3
|
4
|
+
data.tar.gz: 0526bd74ec9f67ce7cf439e1fcbb8bc4719f4afb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bc9c234235bf6e655163f0036cd0965f9f370ea3544fb93a8bedccdf1030aebc161f56e0144fc78450fc57b298c2a9bd9266b88ce5e23f14fc99533a1933418
|
7
|
+
data.tar.gz: 589231190b9aa753d17411d3394fe9363b6914eebc3eeff29b3bc41253937c44b69357b2d44a6507389d9a92786c0f4853c4f0733ad8fdece77f48ae9398f8d1
|
data/lib/rack/strip-cookies.rb
CHANGED
@@ -7,14 +7,13 @@ module Rack
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def call(env)
|
10
|
-
path
|
11
|
-
|
10
|
+
path = Rack::Request.new(env).path
|
11
|
+
included = paths.include?(path)
|
12
|
+
|
13
|
+
env.delete('HTTP_COOKIE') if included
|
12
14
|
|
13
|
-
|
14
|
-
|
15
|
-
# request.session_options[:skip] = true
|
16
|
-
# env.delete('HTTP_COOKIE')
|
17
|
-
end
|
15
|
+
status, headers, body = @app.call(env)
|
16
|
+
headers.delete('Set-Cookie') if included
|
18
17
|
|
19
18
|
[status, headers, body]
|
20
19
|
end
|