Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] Support CSP nonce, SRI, and arbitrary attributes with Vite #43442

Merged
merged 2 commits into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/Illuminate/Foundation/Providers/FoundationServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Contracts\Foundation\MaintenanceMode as MaintenanceModeContract;
use Illuminate\Foundation\MaintenanceModeManager;
use Illuminate\Foundation\Vite;
use Illuminate\Http\Request;
use Illuminate\Log\Events\MessageLogged;
use Illuminate\Support\AggregateServiceProvider;
Expand All @@ -24,6 +25,15 @@ class FoundationServiceProvider extends AggregateServiceProvider
ParallelTestingServiceProvider::class,
];

/**
* The singletons to register into the container.
*
* @var array
*/
public $singletons = [
Vite::class => Vite::class,
];

/**
* Boot the service provider.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,21 @@ public function __call($name, $arguments)
{
return '';
}

public function useIntegrityKey()
{
return $this;
}

public function useScriptTagAttributes()
{
return $this;
}

public function useStyleTagAttributes()
{
return $this;
}
});

return $this;
Expand Down
Loading