class ActionLimiter::Middleware::IP::ResponseBuilder

@private

Public Instance Methods

call(_env) click to toggle source

@private

# File lib/action_limiter/middleware/ip.rb, line 16
def call(_env)
  [429, response_headers, [response_body]]
end

Private Instance Methods

response_body() click to toggle source
# File lib/action_limiter/middleware/ip.rb, line 22
        def response_body
          <<~BODY
            <html>
              <body>
                <h1>Too Many Requests</h1>
              </body>
            </html>
          BODY
        end
response_headers() click to toggle source
# File lib/action_limiter/middleware/ip.rb, line 32
def response_headers
  {
    'Content-Type' => 'text/html; charset=utf-8'
  }
end