mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-05 01:40:54 -05:00
add: announce routing
This commit is contained in:
@@ -58,6 +58,10 @@ class Kernel extends HttpKernel
|
||||
'throttle:30,1',
|
||||
'bindings',
|
||||
],
|
||||
'announce' => [
|
||||
'throttle:1000,1',
|
||||
'bindings',
|
||||
]
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -48,6 +48,10 @@ class RouteServiceProvider extends ServiceProvider
|
||||
Route::prefix('api')
|
||||
->middleware('api')
|
||||
->group(\base_path('routes/api.php'));
|
||||
|
||||
Route::prefix('announce')
|
||||
->middleware('announce')
|
||||
->group(\base_path('routes/announce.php'));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
|
||||
/*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU Affero General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Announce Routes
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
if (config('unit3d.proxy_scheme')) {
|
||||
URL::forceScheme(config('unit3d.proxy_scheme'));
|
||||
}
|
||||
if (config('unit3d.root_url_override')) {
|
||||
URL::forceRootUrl(config('unit3d.root_url_override'));
|
||||
}
|
||||
// Announce System
|
||||
Route::get('/{passkey}', [App\Http\Controllers\AnnounceController::class, 'index'])->name('announce');
|
||||
Reference in New Issue
Block a user