fixed nonce
This commit is contained in:
parent
ff0c090850
commit
a0748788ee
3 changed files with 2 additions and 8 deletions
|
|
@ -5,7 +5,6 @@ namespace App\Providers;
|
||||||
use App\Models\Interfaces\MovieDbInterface;
|
use App\Models\Interfaces\MovieDbInterface;
|
||||||
use App\Services\OmdbService;
|
use App\Services\OmdbService;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Livewire\Livewire;
|
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
|
@ -25,10 +24,5 @@ class AppServiceProvider extends ServiceProvider
|
||||||
if ($this->app->environment('production')) {
|
if ($this->app->environment('production')) {
|
||||||
\URL::forceScheme('https');
|
\URL::forceScheme('https');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configure Livewire CSP nonce
|
|
||||||
Livewire::setScriptNonce(function () {
|
|
||||||
return request()->attributes->get('csp-nonce');
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<x-header/>
|
<x-header/>
|
||||||
{{ $slot }}
|
{{ $slot }}
|
||||||
</div>
|
</div>
|
||||||
@livewireScriptConfig
|
@livewireScriptConfig(['nonce' => request()->attributes->get('csp-nonce')])
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,6 @@
|
||||||
<x-head/>
|
<x-head/>
|
||||||
<body class="bg-blue-600">
|
<body class="bg-blue-600">
|
||||||
{{ $slot }}
|
{{ $slot }}
|
||||||
@livewireScripts
|
@livewireScriptConfig(['nonce' => request()->attributes->get('csp-nonce')])
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue