fixed nonce
Some checks are pending
linter / quality (push) Waiting to run
tests / ci (push) Waiting to run

This commit is contained in:
Edward Tirado Jr 2025-12-14 13:44:20 -06:00
parent ff0c090850
commit a0748788ee
3 changed files with 2 additions and 8 deletions

View file

@ -5,7 +5,6 @@ namespace App\Providers;
use App\Models\Interfaces\MovieDbInterface;
use App\Services\OmdbService;
use Illuminate\Support\ServiceProvider;
use Livewire\Livewire;
class AppServiceProvider extends ServiceProvider
{
@ -25,10 +24,5 @@ class AppServiceProvider extends ServiceProvider
if ($this->app->environment('production')) {
\URL::forceScheme('https');
}
// Configure Livewire CSP nonce
Livewire::setScriptNonce(function () {
return request()->attributes->get('csp-nonce');
});
}
}

View file

@ -6,7 +6,7 @@
<x-header/>
{{ $slot }}
</div>
@livewireScriptConfig
@livewireScriptConfig(['nonce' => request()->attributes->get('csp-nonce')])
</body>
</html>

View file

@ -3,6 +3,6 @@
<x-head/>
<body class="bg-blue-600">
{{ $slot }}
@livewireScripts
@livewireScriptConfig(['nonce' => request()->attributes->get('csp-nonce')])
</body>
</html>