Spec-Zone.ru › htmx

htmx.config.inlineScriptNonce

Sets nonce on inline scripts generated by htmx

The htmx.config.inlineScriptNonce option sets nonce on generated inline scripts.

Use it with a Content Security Policy that requires script nonces.

Default: undefined (no nonce added)

Example

htmx.config.inlineScriptNonce = "abc123";
<meta name="htmx-config" content='{"inlineScriptNonce":"abc123"}'>

The nonce value should match the one provided in your Content-Security-Policy header.

See also: htmx.config

Licensed under the Zero-Clause BSD License.
https://four.htmx.org/reference/config/htmx-config-inlineScriptNonce/

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API