Skip to content
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
8 changes: 0 additions & 8 deletions app/Support/helpers.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

use Illuminate\Support\Facades\Vite;
use Illuminate\Support\Str;

if (! function_exists('localized_route')) {
Expand All @@ -12,10 +11,3 @@ function localized_route(string $name, mixed $parameters = [], bool $absolute =
return route($localizedName, $parameters, $absolute);
}
}

if (! function_exists('csp_nonce')) {
function csp_nonce(): string
{
return Vite::cspNonce() ?? '';
}
}
2 changes: 1 addition & 1 deletion config/csp.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@
* and cannot add inline nonces.
* Note that this will make your CSP policy less secure.
*/
'nonce_enabled' => env('CSP_NONCE_ENABLED', true),
'nonce_enabled' => env('CSP_NONCE_ENABLED', false),
Copy link

Copilot AI Jul 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling CSP nonces by default reduces security protection against XSS attacks. CSP nonces help prevent execution of unauthorized inline scripts. Consider keeping this enabled unless there's a specific compatibility requirement.

Suggested change
'nonce_enabled' => env('CSP_NONCE_ENABLED', false),
'nonce_enabled' => env('CSP_NONCE_ENABLED', true),

Copilot uses AI. Check for mistakes.
];
Loading