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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c7bfaf175069ddb346c673e79b9dfbc171e8fb24
4
- data.tar.gz: 25c634b2594cb6f3fc9d7b1897a73c64c87c5baf
3
+ metadata.gz: f9c4fe67d9dcfa5ae74a87e13fe286911cfd665e
4
+ data.tar.gz: e36f64c12e7f6321cd601a61e7d87e6ef7f4287e
5
5
  SHA512:
6
- metadata.gz: dc96ca93b776f9aba1022ee53fc0d7d1e7df0326a619d639cf5118998d734db86b5e405723cd5f57bc7caf2d4c666528bd430a27104e91630b6c98379ec61449
7
- data.tar.gz: 155fa8f6c6179892e8b86a5dbc1c9aa7daf417522360f18c2a05682e68103168d6e0bb65f4fb935b6276187c8f2d99c2045addcbd48fd75fbc8e1338d9b74626
6
+ metadata.gz: c6482390b84305825fa0a8c54ab5689ee19ac51444b842c18efe080e5d432f727f3d5c35a8cc7cf631ae967d521c1864d71914bacb6698bea78f745e6cee3004
7
+ data.tar.gz: '09d6aeee9fd88d43956ed35b822a6cd8e9c45f492e4c5a814feb20f96af3f5d420cf5829f47a03dba504b93ddcc249db1003f0b3f42ea058ec789a4ea39aef3e'
@@ -1,7 +1,7 @@
1
1
  module Rack
2
2
  module Secure
3
3
  module Referer
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2"
5
5
  end
6
6
  end
7
7
  end
@@ -4,8 +4,7 @@ require 'rack/request'
4
4
  module Rack
5
5
  module Secure
6
6
  module Referer
7
- def new(*args)
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.extend Rack::Secure::Referer
17
+ Rack::Request.prepend Rack::Secure::Referer
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-secure-referer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ppworks