diff --git a/src/Controllers/UserAvatarController.php b/src/Controllers/UserAvatarController.php index e5e5877a..c74cc02b 100644 --- a/src/Controllers/UserAvatarController.php +++ b/src/Controllers/UserAvatarController.php @@ -53,7 +53,7 @@ final class UserAvatarController extends AbstractController private function serveFromUrl($url) { - $this->httpHelper->nonCachedRedirect($url); + $this->httpHelper->redirect($url); } private function serveFromFile($file, $size) diff --git a/src/Helpers/HttpHelper.php b/src/Helpers/HttpHelper.php index ccdeeda7..1793c726 100644 --- a/src/Helpers/HttpHelper.php +++ b/src/Helpers/HttpHelper.php @@ -46,6 +46,12 @@ class HttpHelper return $requestUri; } + public function redirect($destination) + { + $this->setResponseCode(307); + $this->setHeader('Location', $destination); + } + public function nonCachedRedirect($destination) { $this->setResponseCode(303);