Sha256: 97e5acc03329e907d282998471ca2460e10e5a4e96b5d57912435673a68a3a4b

Contents?: true

Size: 233 Bytes

Versions: 2

Compression:

Stored size: 233 Bytes

Contents

module Rack
  class ServerStatus
    def initialize(app)
      @app = app
    end

    def call(env)
      return [200, {'Content-Type' => 'text/plain'}, ['OK']] if env['PATH_INFO'] == '/status'
      @app.call(env)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rack-server-status-0.0.2 lib/rack/server_status.rb
rack-server-status-0.0.1 lib/rack/server_status.rb