mirror of
https://github.com/flarum/framework.git
synced 2024-12-15 00:23:38 +08:00
Redirect using configured base URL
This commit is contained in:
parent
f3d45902fc
commit
f2b05798e2
|
@ -13,6 +13,7 @@ namespace Flarum\Support;
|
||||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||||
use Zend\Diactoros\Response\EmptyResponse;
|
use Zend\Diactoros\Response\EmptyResponse;
|
||||||
use Zend\Diactoros\Response\RedirectResponse;
|
use Zend\Diactoros\Response\RedirectResponse;
|
||||||
|
use Flarum\Core;
|
||||||
|
|
||||||
abstract class Action
|
abstract class Action
|
||||||
{
|
{
|
||||||
|
@ -37,6 +38,8 @@ abstract class Action
|
||||||
*/
|
*/
|
||||||
protected function redirectTo($url)
|
protected function redirectTo($url)
|
||||||
{
|
{
|
||||||
|
$url = Core::config('base_url') . $url;
|
||||||
|
|
||||||
$content = sprintf('
|
$content = sprintf('
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user