NonceViewHelper

final class \TYPO3\CMS\Fluid\ViewHelpers\Security\NonceViewHelper

Extends
AbstractViewHelper

ViewHelper to retrieve (and consume) a `nonce` attribute from the global server request object pool, or from the `PolicyProvider` service as a fall-back value.

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

Tags

see
https://docs.typo3.org/permalink/t3viewhelper:typo3-fluid-security-nonce
see
https://docs.typo3.org/permalink/t3coreapi:content-security-policy
see
PolicyProvider

Table of Contents

Methods

__construct()  : mixed
initializeArguments()  : void
render()  : string

Methods

initializeArguments()

public initializeArguments() : void

render()

public render() : string

Return values

string
On this page