mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 01:58:07 +00:00
Fix FLEXIAPI-348 Add a fallback 404 page for URLs that are pointing to no configured Spaces
This commit is contained in:
parent
c6170f5f07
commit
327c017b8f
4 changed files with 32 additions and 4 deletions
|
|
@ -17,7 +17,7 @@ class SpaceCheck
|
|||
|
||||
$space = space();
|
||||
|
||||
if ($space) {
|
||||
if ($space != null) {
|
||||
if (!str_ends_with($space->host, config('app.root_host'))) {
|
||||
return abort(503, 'The APP_ROOT_HOST configured does not match with the current root domain');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
@extends('layouts.main')
|
||||
@extends(space() != null ? 'layouts.main' : 'layouts.main_minimal')
|
||||
|
||||
@section('content')
|
||||
|
||||
|
|
|
|||
26
flexiapi/resources/views/layouts/main_minimal.blade.php
Normal file
26
flexiapi/resources/views/layouts/main_minimal.blade.php
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<title>@yield('code') - @yield('title')</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('css/style.css') }}">
|
||||
|
||||
<script src="{{ asset('scripts/utils.js') }}"></script>
|
||||
<script src="{{ asset('scripts/chart.js') }}"></script>
|
||||
<script src="{{ asset('scripts/chartjs-plugin-datalabels@2.0.0') }}"></script>
|
||||
</head>
|
||||
|
||||
<body class="@if (isset($welcome) && $welcome) welcome @endif">
|
||||
<content>
|
||||
<section>
|
||||
@yield('content')
|
||||
</section>
|
||||
</content>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -48,8 +48,10 @@ use App\Http\Controllers\Admin\SpaceController;
|
|||
use App\Http\Controllers\Admin\StatisticsController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::redirect('/', 'login')->name('account.home');
|
||||
Route::get('about', 'AboutController@about')->name('about');
|
||||
Route::middleware(['space.check'])->group(function () {
|
||||
Route::redirect('/', 'login')->name('account.home');
|
||||
Route::get('about', 'AboutController@about')->name('about');
|
||||
});
|
||||
|
||||
Route::middleware(['web_panel_enabled', 'space.check'])->group(function () {
|
||||
Route::get('wizard/{provisioning_token}', 'Account\ProvisioningController@wizard')->name('provisioning.wizard');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue