Sha256: 91f5a4df31f3685da3248fa8a0afd2dfa9decf11df9146db898a11ffa4be4689
Contents?: true
Size: 471 Bytes
Versions: 15
Compression:
Stored size: 471 Bytes
Contents
module Gluttonberg module Middleware class Honeypot def initialize(app, field_name) @app = app @field_name = field_name end def call(env) form_hash = env["rack.request.form_hash"] if form_hash && form_hash[@field_name] =~ /\S/ [200, {'Content-Type' => 'text/html', "Content-Length" => "0"}, []] else @app.call(env) end end end end # Middleware end # Gluttonberg
Version data entries
15 entries across 15 versions & 1 rubygems