Take a break

This commit is contained in:
ct
2023-12-06 10:25:34 +08:00
parent f3e191223a
commit 477d101f5e
3 changed files with 27 additions and 13 deletions

View File

@@ -23,6 +23,14 @@ class RouteServiceProvider extends ServiceProvider
* Define your route model bindings, pattern filters, and other route configuration. * Define your route model bindings, pattern filters, and other route configuration.
*/ */
public function boot(): void public function boot(): void
{
if (config('platform.global.hiatus'))
{
Route::middleware('web')
->group(base_path('routes/hiatus.php'));
}
else
{ {
RateLimiter::for('api', function (Request $request) { RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip()); return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
@@ -41,4 +49,7 @@ public function boot(): void
}); });
} }
}
} }

View File

@@ -2,6 +2,8 @@
return [ return [
'hiatus' => true,
'indexing' => env('ENABLE_INDEXING', false), 'indexing' => env('ENABLE_INDEXING', false),
'launched_epoch' => '1695513600', // 24-09-2023 00:00:00 GMT +0 'launched_epoch' => '1695513600', // 24-09-2023 00:00:00 GMT +0

View File

@@ -0,0 +1 @@
FutureWalker.co is undergoing an amazing update! In the meantime follow me at <a href="https://x.com/charlestehio">@charlestehio</a> in X.