Skip to content

Additional attributes for f:security.nonce #187

@ohader

Description

@ohader

Examples

<script nonce="{f:security.nonce(directive: 'script-src', scope: 'inline')}">
const test = true;
</script>
<script nonce="{f:security.nonce(directive: 'script-src', scope: 'static')}" src="{scriptUri}"></script>

New Attributes

  • directive can be one of script-src, script-src-elem, style-src, style-src-elem
  • scope can be either static or inline (default)

Hint

The {f:security.nonce()} view-helper is meant as a compatibility fallback. It is suggested to use more specific view-helpers like <f:asset.css> or <f:asset.script>.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions