Created
November 13, 2012 19:45
-
-
Save gnarg/4067931 to your computer and use it in GitHub Desktop.
swallow agent_listener calls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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