Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jayaddison
Copy link
Contributor

$response = new \Slim\Psr7\Response(); // No content when unauthorized
$response = $response->withHeader('Location', $this->AppContainer->get('UrlManager')->ConstructUrl('/login'));
$response = $this->responseFactory->createResponse();
return $response->withHeader('Location', $this->AppContainer->get('UrlManager')->ConstructUrl('/login'));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@berrnd Minor; please also note the early return statement here for slight additional safety.

Copy link
Member

@berrnd berrnd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! :)

@berrnd berrnd merged commit ca93540 into grocy:master Apr 3, 2020
@jayaddison jayaddison deleted the middleware-authentication-handling branch April 3, 2020 16:45
@jayaddison
Copy link
Contributor Author

Thanks a lot! :)

No probs :)

berrnd added a commit that referenced this pull request Apr 3, 2020
berrnd pushed a commit that referenced this pull request Apr 4, 2020
berrnd added a commit that referenced this pull request Apr 4, 2020
(cherry picked from commit 30908f5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

Potential security issue / Content is rendered for 302 redirects

2 participants