Skip to content

Commit

Permalink
app.csp_custom env parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
freescout-help-desk committed May 9, 2024
1 parent 99a4b4b commit 9894ca7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Misc/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2101,8 +2101,8 @@ public static function cspMetaTag()
$nonce = \Helper::cspNonce();

return "<meta http-equiv=\"Content-Security-Policy\" content=\"script-src 'self' 'nonce-".$nonce."' "
.config('app.csp_script_src').' '.\Eventy::filter('csp.script_src', '')."\">";
//<meta property=\"csp-nonce\" id=\"csp-nonce\" content=\"".$nonce."\">";
.config('app.csp_script_src').' '.\Eventy::filter('csp.script_src', '').";"
.config('app.csp_custom').\Eventy::filter('csp.custom', '')."\">";
}

public static function cspNonceAttr()
Expand Down
1 change: 1 addition & 0 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@
*/
'csp_enabled' => env('APP_CSP_ENABLED', true),
'csp_script_src' => env('APP_CSP_SCRIPT_SRC', ''),
'csp_custom' => env('APP_CSP_CUSTOM', ''),

/*
|--------------------------------------------------------------------------
Expand Down

0 comments on commit 9894ca7

Please sign in to comment.