Skip to content

Commit

Permalink
remove hashes from CSP when using log-viewer (#1861)
Browse files Browse the repository at this point in the history
* remove hashes from CSP when using log-viewer
* push 4.9.2 sadly
  • Loading branch information
ildyria authored May 22, 2023
1 parent e87e426 commit 88aacd7
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ public function boot()
// We only do that in that specific case. It is disabled by default otherwise.
config(['secure-headers.csp.script-src.unsafe-eval' => true]);
config(['secure-headers.csp.script-src.unsafe-inline' => true]);
config(['secure-headers.csp.script-src.unsafe-inline' => true]);
config(['secure-headers.csp.script-src.hashes.sha256' => []]);

// Allow to bypass when debug is ON and when env is dev
// At this point, it is no longer our fault if the Lychee admin have their logs publically accessible.
Expand Down
26 changes: 26 additions & 0 deletions database/migrations/2023_05_21_225616_bump_version040902.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

return new class() extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up(): void
{
DB::table('configs')->where('key', 'version')->update(['value' => '040902']);
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down(): void
{
DB::table('configs')->where('key', 'version')->update(['value' => '040901']);
}
};
2 changes: 1 addition & 1 deletion version.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.9.1
4.9.2

0 comments on commit 88aacd7

Please sign in to comment.