Skip to content

Instantly share code, notes, and snippets.

@gnarg
Created November 13, 2012 19:45
Show Gist options
  • Save gnarg/4067931 to your computer and use it in GitHub Desktop.
Save gnarg/4067931 to your computer and use it in GitHub Desktop.
swallow agent_listener calls
class AgentListener
def initialize(app, options = {})
@app = app
end
def call(env)
if /^\/agent_listener/ =~ ::Rack::Request.new(env).path_info
[404, {}, ['']]
else
@app.call(env)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment