Created
December 18, 2013 20:19
-
-
Save queertypes/8029251 to your computer and use it in GitHub Desktop.
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
def wrap(app): | |
def middleware(env, start_response): | |
path = env['PATH_INFO'] | |
is_forwarded = env['HTTP_X_FORWARDED_FOR']: | |
if is_forwarded and path == '/v1/health': | |
return start_response('200 OK', []) | |
return app(env, start_response) | |
return middleware |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
L5 should be: