Ver código fonte

fix: 继续修复静态资源https问题

过卫栋 4 semanas atrás
pai
commit
14740cca1a
1 arquivos alterados com 3 adições e 0 exclusões
  1. 3 0
      bootstrap/app.php

+ 3 - 0
bootstrap/app.php

@@ -20,6 +20,9 @@ return Application::configure(basePath: dirname(__DIR__))
         \App\Console\Commands\SyncQuestionsFromQuestionBank::class,
     ])
     ->withMiddleware(function (Middleware $middleware): void {
+        // 信任所有代理,允许读取 X-Forwarded-* 头
+        $middleware->trustProxies(at: '*');
+
         $middleware->alias([
             'internal.token' => \App\Http\Middleware\InternalApiToken::class,
         ]);