Improved avatar loading speed
This commit is contained in:
parent
91e140293e
commit
a5c89bc48e
2 changed files with 7 additions and 1 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue