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

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

if (! function_exists('localized_route')) {
Expand All @@ -11,3 +12,10 @@ 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() ?? '';
}
}
4 changes: 2 additions & 2 deletions database/seeders/Codebar/ConfigurationsTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public function run(): void
'company_primary_color' => '#500472',

'component_intro' => [
LocaleEnum::DE->value => file_get_contents(database_path('seeders/files/codebar_intro_de.md')),
LocaleEnum::EN->value => file_get_contents(database_path('seeders/files/codebar_intro_en.md')),
LocaleEnum::DE->value => file_get_contents(database_path('files/intro/codebar_intro_de.md')),
LocaleEnum::EN->value => file_get_contents(database_path('files/intro/codebar_intro_en.md')),
],

'section_news' => false,
Expand Down
4 changes: 2 additions & 2 deletions database/seeders/Paperflakes/ConfigurationsTableSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public function run(): void
'company_primary_color' => '#69b3a1',

'component_intro' => [
LocaleEnum::DE->value => file_get_contents(database_path('seeders/files/paperflakes_intro_de.md')),
LocaleEnum::EN->value => file_get_contents(database_path('seeders/files/paperflakes_intro_en.md')),
LocaleEnum::DE->value => file_get_contents(database_path('files/intro/paperflakes_intro_de.md')),
LocaleEnum::EN->value => file_get_contents(database_path('files/intro/paperflakes_intro_en.md')),
],

'section_news' => true,
Expand Down
1 change: 1 addition & 0 deletions resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class="scroll-smooth"
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="csrf-token" content="{{ csrf_token() }}"/>
<meta property="csp-nonce" content="{{ csp_nonce() }}">
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.

The meta tag property 'csp-nonce' is not a standard HTML meta property. CSP nonces are typically applied directly to script and style tags via the 'nonce' attribute, not as a meta tag. Consider removing this meta tag and applying the nonce directly to the relevant script/style tags instead.

Suggested change
<meta property="csp-nonce" content="{{ csp_nonce() }}">
// Line removed as the nonce will be applied directly to script tags.

Copilot uses AI. Check for mistakes.

<!-- Resource hints for performance -->
<link rel="preconnect" href="https://res.cloudinary.com">
Expand Down