Endpoint and router plugs for PhoenixAssetPipeline.
This module provides plugs for early hints, CSP reporting, secure CSP augmentation, private URL assigns, reporting endpoints, and manifest snapshots during code reloading.
Summary
Functions
Returns the base Content Security Policy used by secure_browser_headers/1.
Handles CSP violation reports posted to /csp-report.
Sends 103 early hints for the static origin, manifest-backed scripts, and configured links.
Captures the current manifest for the lifetime of a request.
Registers a before-send callback that merges manifest asset sources into CSP.
Stores router/static URL and host values in conn.private.
Adds a Reporting-Endpoints header for CSP reports.
Returns secure browser headers suitable for Phoenix router pipelines.
Functions
Returns the base Content Security Policy used by secure_browser_headers/1.
Handles CSP violation reports posted to /csp-report.
Sends 103 early hints for the static origin, manifest-backed scripts, and configured links.
Captures the current manifest for the lifetime of a request.
Use this around Phoenix code reloading so a request sees a consistent manifest even when templates trigger a rebuild during rendering.
Registers a before-send callback that merges manifest asset sources into CSP.
Stores router/static URL and host values in conn.private.
Adds a Reporting-Endpoints header for CSP reports.
Returns secure browser headers suitable for Phoenix router pipelines.