Skip to content

Commit 88aacd7

Browse files
authored
remove hashes from CSP when using log-viewer (#1861)
* remove hashes from CSP when using log-viewer * push 4.9.2 sadly
1 parent e87e426 commit 88aacd7

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

app/Providers/AppServiceProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ public function boot()
120120
// We only do that in that specific case. It is disabled by default otherwise.
121121
config(['secure-headers.csp.script-src.unsafe-eval' => true]);
122122
config(['secure-headers.csp.script-src.unsafe-inline' => true]);
123+
config(['secure-headers.csp.script-src.unsafe-inline' => true]);
124+
config(['secure-headers.csp.script-src.hashes.sha256' => []]);
123125

124126
// Allow to bypass when debug is ON and when env is dev
125127
// At this point, it is no longer our fault if the Lychee admin have their logs publically accessible.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Support\Facades\DB;
5+
6+
return new class() extends Migration {
7+
/**
8+
* Run the migrations.
9+
*
10+
* @return void
11+
*/
12+
public function up(): void
13+
{
14+
DB::table('configs')->where('key', 'version')->update(['value' => '040902']);
15+
}
16+
17+
/**
18+
* Reverse the migrations.
19+
*
20+
* @return void
21+
*/
22+
public function down(): void
23+
{
24+
DB::table('configs')->where('key', 'version')->update(['value' => '040901']);
25+
}
26+
};

version.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.9.1
1+
4.9.2

0 commit comments

Comments
 (0)