Fixed cookie getting lost (attempt).

This commit is contained in:
flash 2021-09-17 20:51:18 +00:00
parent 51bc99e454
commit a363d8d574
2 changed files with 2 additions and 5 deletions

View file

@ -277,7 +277,7 @@ final class SockChatHandler extends Handler {
$response->redirect(
$currentUser === null
? url('auth-login', ['redirect' => $chatPath])
? url('auth-login', ['redirect' => '/_sockchat/login'])
: $chatPath
);
}

View file

@ -271,8 +271,5 @@ function is_local_url(string $url): bool {
if($url[0] === '/' && ($length > 1 ? $url[1] !== '/' : true))
return true;
if(starts_with($url, url_prefix()))
return true;
return ends_with(parse_url($url, PHP_URL_HOST), '.' . $_SERVER['HTTP_HOST']);
return starts_with($url, url_prefix());
}