http_defender 0.1.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/http_defender.rb +3 -3
- data/lib/http_defender/version.rb +1 -1
- metadata +1 -2
- data/http_defender-0.1.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e62ca2f31f24524d44f3013658d05ced5d6c476
|
4
|
+
data.tar.gz: bf7018e1512eeadfe97c4f586d7198279bc30862
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 426b8cf7e53bc4fe8622841b1796754dd2020a1efc255df5414d0cd76fcd019067bc2cfbb65d4ee04cc7a3e9f62f800af7b7b1303b11cfb9b5f6aaccc8a64005
|
7
|
+
data.tar.gz: a5ae1cd67adaed356031cc6f3ebc6b55420fda762f9d83ee661da67841b5921594f8b94f4775f10539e79c7540f592546f945cd837cb069b947ac309bd5398e8
|
data/lib/http_defender.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
require "http_defender/version"
|
2
2
|
|
3
3
|
module HttpDefender
|
4
|
-
module
|
4
|
+
module Deflect
|
5
5
|
extend ActiveSupport::Concern
|
6
6
|
BLOCKED_HTTP_ENVS = %w(torrent proxyunlocked)
|
7
7
|
included do
|
8
|
-
before_action :
|
8
|
+
before_action :deflect_domains
|
9
9
|
end
|
10
10
|
|
11
|
-
def
|
11
|
+
def deflect_domains
|
12
12
|
BLOCKED_HTTP_ENVS.each do |bhe|
|
13
13
|
next unless request.env['HTTP_HOST'].include?(bhe)
|
14
14
|
head :no_content
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http_defender
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Freddy McGroarty
|
@@ -82,7 +82,6 @@ files:
|
|
82
82
|
- Rakefile
|
83
83
|
- bin/console
|
84
84
|
- bin/setup
|
85
|
-
- http_defender-0.1.0.gem
|
86
85
|
- http_defender.gemspec
|
87
86
|
- lib/http_defender.rb
|
88
87
|
- lib/http_defender/version.rb
|
data/http_defender-0.1.0.gem
DELETED
Binary file
|