正在显示
1 个修改的文件
包含
10 行增加
和
24 行删除
@@ -35,23 +35,18 @@ class RouteServiceProvider extends ServiceProvider | @@ -35,23 +35,18 @@ class RouteServiceProvider extends ServiceProvider | ||
35 | */ | 35 | */ |
36 | public function boot() | 36 | public function boot() |
37 | { | 37 | { |
38 | - $sld_prefix = isset($_SERVER['HTTP_HOST']) ? explode('.',$_SERVER['HTTP_HOST'])[0] : ""; | ||
39 | - if($sld_prefix == 'm'){ | ||
40 | - $this->mapAmpRoutes(); | ||
41 | - }else{ | ||
42 | - $this->configureRateLimiting(); | 38 | + $this->configureRateLimiting(); |
43 | 39 | ||
44 | - $this->routes(function () { | ||
45 | - Route::prefix('api') | ||
46 | - ->middleware('api') | ||
47 | - ->namespace($this->namespace) | ||
48 | - ->group(base_path('routes/api.php')); | 40 | + $this->routes(function () { |
41 | + Route::prefix('api') | ||
42 | + ->middleware('api') | ||
43 | + ->namespace($this->namespace) | ||
44 | + ->group(base_path('routes/api.php')); | ||
49 | 45 | ||
50 | - Route::middleware('web') | ||
51 | - ->namespace($this->namespace) | ||
52 | - ->group(base_path('routes/web.php')); | ||
53 | - }); | ||
54 | - } | 46 | + Route::middleware('web') |
47 | + ->namespace($this->namespace) | ||
48 | + ->group(base_path('routes/web.php')); | ||
49 | + }); | ||
55 | } | 50 | } |
56 | 51 | ||
57 | /** | 52 | /** |
@@ -65,13 +60,4 @@ protected function configureRateLimiting() | @@ -65,13 +60,4 @@ protected function configureRateLimiting() | ||
65 | return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); | 60 | return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); |
66 | }); | 61 | }); |
67 | } | 62 | } |
68 | - | ||
69 | - /** | ||
70 | - * @author Akun | ||
71 | - * @date 2024/01/26 11:03 | ||
72 | - */ | ||
73 | - protected function mapAmpRoutes(){ | ||
74 | - Route::namespace('App\Http\Controllers\Amp') | ||
75 | - ->group(base_path('routes/amp.php')); | ||
76 | - } | ||
77 | } | 63 | } |
-
请 注册 或 登录 后发表评论