ZoonkWeb.CSP (Zoonk v0.1.0-dev)

View Source

Content Security Policy (CSP) plugs.

Summary

Functions

Sets a CSP nonce for the response. This nonce can be used in the CSP header and in the HTML template to allow inline scripts/styles.

Functions

set_csp_nonce(conn, opts)

Sets a CSP nonce for the response. This nonce can be used in the CSP header and in the HTML template to allow inline scripts/styles.

Example

<script nonce={assigns[:csp_nonce]}>
  // Your inline script here
</script>