Skip to content

Instantly share code, notes, and snippets.

@dnch
Created December 7, 2011 11:21
Show Gist options
  • Select an option

  • Save dnch/1442456 to your computer and use it in GitHub Desktop.

Select an option

Save dnch/1442456 to your computer and use it in GitHub Desktop.
class FancyMiddleware
def initialize(app)
@app = app
@excluded_paths = []
end
def call(env)
# env variable may be wrong here
if @excluded_paths.include(env["REQUEST_PATH"])
# do magic
end
@app.call(env)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment