movie-night-nuevo/app/Providers/AppServiceProvider.php
Edward Tirado Jr. ff0c090850
Some checks are pending
linter / quality (push) Waiting to run
tests / ci (push) Waiting to run
fixed nonce
2025-12-14 13:42:50 -06:00

34 lines
770 B
PHP

<?php
namespace App\Providers;
use App\Models\Interfaces\MovieDbInterface;
use App\Services\OmdbService;
use Illuminate\Support\ServiceProvider;
use Livewire\Livewire;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
$this->app->bind(MovieDbInterface::class, OmdbService::class);
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
if ($this->app->environment('production')) {
\URL::forceScheme('https');
}
// Configure Livewire CSP nonce
Livewire::setScriptNonce(function () {
return request()->attributes->get('csp-nonce');
});
}
}