Created
September 1, 2017 15:07
-
-
Save gustavo-depaula/4f748e5905bf37b17868da6fb57c1baa 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
function ($request, $response, $next) { | |
if ($request->isPost()) { | |
$parsed_request = $request->getParsedBody(); | |
if ($parsed_request['key'] == "unhackable") { | |
$response = $next($request, $response); | |
} | |
} else { | |
$response = $next($request, $response); | |
} | |
return $response; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment