Skip to content

Commit a491276

Browse files
committed
Merge pull request #6 from dmregister/master
remove location header to prevent redirect
2 parents a4e44e2 + 6c4d061 commit a491276

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/OAuth2Server/Controller/AuthorizeController.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ public function authorizeAction()
4141
}
4242

4343
if (!$server->validateAuthorizeRequest($request, $response)) {
44+
$headers = $response->getHeaders();
45+
$location = $headers->get('location');
46+
if ($location)
47+
{
48+
$headers->removeHeader($location);
49+
}
4450
return new JsonModel($response->getContent());
4551
}
4652

0 commit comments

Comments
 (0)