diff --git a/routes/web.php b/routes/web.php index b9979fa5..08d9dca5 100755 --- a/routes/web.php +++ b/routes/web.php @@ -12,8 +12,10 @@ use Illuminate\Http\Request; */ Route::get('/', function (Request $request) { - if (config('v2board.app_url') && ($request->getSchemeAndHttpHost() !== config('v2board.app_url'))) { - abort(403, 'forbidden'); + if (config('v2board.app_url')) { + if ($request->server('HTTP_HOST') !== parse_url(config('v2board.app_url'))['host']) { + abort(403, 'forbidden'); + } } return view('app', [ 'title' => config('v2board.app_name', 'V2Board'),