Skip to content

Instantly share code, notes, and snippets.

@gustavo-depaula
Created September 1, 2017 15:07
Show Gist options
  • Save gustavo-depaula/4f748e5905bf37b17868da6fb57c1baa to your computer and use it in GitHub Desktop.
Save gustavo-depaula/4f748e5905bf37b17868da6fb57c1baa to your computer and use it in GitHub Desktop.
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