rack-secure-referer 1.0.1 → 1.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/secure/referer/version.rb +1 -1
- data/lib/rack/secure/referer.rb +2 -3
- 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: f9c4fe67d9dcfa5ae74a87e13fe286911cfd665e
|
4
|
+
data.tar.gz: e36f64c12e7f6321cd601a61e7d87e6ef7f4287e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6482390b84305825fa0a8c54ab5689ee19ac51444b842c18efe080e5d432f727f3d5c35a8cc7cf631ae967d521c1864d71914bacb6698bea78f745e6cee3004
|
7
|
+
data.tar.gz: '09d6aeee9fd88d43956ed35b822a6cd8e9c45f492e4c5a814feb20f96af3f5d420cf5829f47a03dba504b93ddcc249db1003f0b3f42ea058ec789a4ea39aef3e'
|
data/lib/rack/secure/referer.rb
CHANGED
@@ -4,8 +4,7 @@ require 'rack/request'
|
|
4
4
|
module Rack
|
5
5
|
module Secure
|
6
6
|
module Referer
|
7
|
-
def
|
8
|
-
env = args[0]
|
7
|
+
def initialize(env, *_)
|
9
8
|
if !env['HTTP_REFERER'].nil? && !env['HTTP_REFERER'].match(/\Ahttp(s)?:\/\//i)
|
10
9
|
env['HTTP_REFERER'] = nil
|
11
10
|
end
|
@@ -15,4 +14,4 @@ module Rack
|
|
15
14
|
end
|
16
15
|
end
|
17
16
|
|
18
|
-
Rack::Request.
|
17
|
+
Rack::Request.prepend Rack::Secure::Referer
|