Skip to content

Commit

Permalink
Merge pull request #16753 from abpframework/salihozkara/nullException
Browse files Browse the repository at this point in the history
Fix NullException
  • Loading branch information
EngincanV committed Jun 5, 2023
2 parents 92fab8d + ab73a19 commit df5f991
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ protected virtual string BuildContentSecurityPolicyValue(HttpContext context)

var nonceStr = $" 'nonce-{nonceValue}'";

var scriptSrcValue = Options.Value.ContentSecurityPolicyValue.Split(';')
var scriptSrcValue = Options.Value.ContentSecurityPolicyValue?.Split(';')
.FirstOrDefault(x => x.Trim().StartsWith(ScriptSrcKey))?.Trim();

if (scriptSrcValue.IsNullOrWhiteSpace())
Expand Down

0 comments on commit df5f991

Please sign in to comment.