diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 45138c0..d8db93e 100755 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -20,6 +20,7 @@ class Kernel extends HttpKernel \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, \App\Http\Middleware\TrimStrings::class, \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, + \App\Http\Middleware\InitializePlugins::class, ]; /** diff --git a/app/Http/Middleware/InitializePlugins.php b/app/Http/Middleware/InitializePlugins.php new file mode 100644 index 0000000..7e74992 --- /dev/null +++ b/app/Http/Middleware/InitializePlugins.php @@ -0,0 +1,36 @@ +pluginManager = $pluginManager; + } + + public function handle(Request $request, Closure $next) + { + try { + $plugins = Plugin::query() + ->where('is_enabled', true) + ->get(); + + foreach ($plugins as $plugin) { + $this->pluginManager->enable($plugin->code); + } + } catch (\Exception $e) { + Log::error('Failed to load plugins: ' . $e->getMessage()); + } + + return $next($request); + } +} \ No newline at end of file diff --git a/docs/en/installation/aapanel-docker.md b/docs/en/installation/aapanel-docker.md index 9b82378..9366d27 100644 --- a/docs/en/installation/aapanel-docker.md +++ b/docs/en/installation/aapanel-docker.md @@ -84,7 +84,7 @@ docker compose up -d #### 3.4 Configure Reverse Proxy Add the following content to your site configuration: ```nginx -location / { +location ^~ / { proxy_pass http://127.0.0.1:7001; proxy_http_version 1.1; proxy_set_header Connection ""; @@ -134,4 +134,4 @@ If you encounter any issues during installation or operation, please check: 2. All required ports are available 3. Docker services are running properly 4. Nginx configuration is correct -5. Check logs for detailed error messages \ No newline at end of file +5. Check logs for detailed error messages