remove left-overs from inheriting from Rack::Attack
This commit is contained in:
parent
e478c621f2
commit
5e40f33fc1
|
@ -50,7 +50,7 @@ GIT
|
||||||
|
|
||||||
GIT
|
GIT
|
||||||
remote: git://github.com/travis-ci/travis-core.git
|
remote: git://github.com/travis-ci/travis-core.git
|
||||||
revision: 3bf0ef70894375578a9af55e0eb9566eb9424294
|
revision: d76e7aa7bac71737553fe127fe825981b8a2bbf6
|
||||||
specs:
|
specs:
|
||||||
travis-core (0.0.1)
|
travis-core (0.0.1)
|
||||||
actionmailer (~> 3.2.19)
|
actionmailer (~> 3.2.19)
|
||||||
|
@ -81,7 +81,7 @@ GIT
|
||||||
|
|
||||||
GIT
|
GIT
|
||||||
remote: git://github.com/travis-ci/travis-support.git
|
remote: git://github.com/travis-ci/travis-support.git
|
||||||
revision: e7f81093f83bd029cca6508739c5720e57e3d571
|
revision: a56f184c84f1f243da40daeaaf07f4ba931e6384
|
||||||
specs:
|
specs:
|
||||||
travis-support (0.0.1)
|
travis-support (0.0.1)
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
require 'rack/attack'
|
require 'rack/attack'
|
||||||
|
|
||||||
class Rack::Attack
|
class Rack::Attack
|
||||||
module RequestMixin
|
class Request
|
||||||
TOKEN = 'travis.access_token'.freeze
|
|
||||||
Rack::Attack::Request.prepend(self)
|
|
||||||
|
|
||||||
def travis_token
|
def travis_token
|
||||||
env.fetch(TOKEN)
|
env.fetch(TOKEN)
|
||||||
end
|
end
|
||||||
|
@ -18,10 +15,6 @@ class Rack::Attack
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.cache
|
|
||||||
Rack::Attack.cache
|
|
||||||
end
|
|
||||||
|
|
||||||
####
|
####
|
||||||
# Ban based on: IP address
|
# Ban based on: IP address
|
||||||
# Ban time: indefinite
|
# Ban time: indefinite
|
||||||
|
|
Loading…
Reference in New Issue
Block a user