Created
December 7, 2011 11:21
-
-
Save dnch/1442456 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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