Allow reverse proxy

This commit is contained in:
weeb 2025-05-02 14:20:27 +02:00
parent 509080a62b
commit 81f73029f1
2 changed files with 6 additions and 2 deletions

View File

@ -3,6 +3,7 @@
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\URL;
class AppServiceProvider extends ServiceProvider
{
@ -19,6 +20,9 @@ class AppServiceProvider extends ServiceProvider
*/
public function boot(): void
{
//
// Force HTTPS for all URLs generated by Laravel (including Livewire)
if (env('APP_ENV') === 'production') {
URL::forceScheme('https');
}
}
}

View File

@ -11,7 +11,7 @@ return Application::configure(basePath: dirname(__DIR__))
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
//
$middleware->trustProxies(at: '*');
})
->withExceptions(function (Exceptions $exceptions) {
//