Skip to content

Commit

Permalink
Fix for Vue js not loading due to CSP :(
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Jun 25, 2020
1 parent 35b9cf4 commit 339bddd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Http/Middleware/SecurityHeaders.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function handle($request, Closure $next)
}


// This defaults to false to maintain backwards compatibility
// This defaults to false to maintain backwards compatibility for
// people who are not running Snipe-IT over TLS (shame, shame, shame!)
// Seriously though, please run Snipe-IT over TLS. Let's Encrypt is free.
// https://letsencrypt.org
Expand All @@ -102,7 +102,7 @@ public function handle($request, Closure $next)
if ((config('app.debug')!='true') || (config('app.enable_csp')=='true')) {
$csp_policy[] = "default-src 'self'";
$csp_policy[] = "style-src 'self' 'unsafe-inline'";
$csp_policy[] = "script-src 'self' 'unsafe-inline'";
$csp_policy[] = "script-src 'self' 'unsafe-inline' 'unsafe-eval'";
$csp_policy[] = "connect-src 'self'";
$csp_policy[] = "object-src 'none'";
$csp_policy[] = "font-src 'self' data:";
Expand Down

0 comments on commit 339bddd

Please sign in to comment.