Security
Security headers
Send browser security policies such as CSP and frame restrictions from your Easel app.
Easel sends Strict-Transport-Security on every response; see
HTTPS. Other browser security policies depend on
what your app loads and embeds, so your app sends them.
Recommended baseline
Start from these headers and adjust them to your app:
frame-ancestorsandX-Frame-Optionsstop other sites from framing your pages. If you embed your own pages, useSAMEORIGINor list the allowed origins inframe-ancestors.Permissions-Policyturns off browser features your app doesn't use.
Roll out a Content Security Policy
A real CSP has to cover your app's scripts, styles, images, fonts, frames, and API origins, so enforcing one straight away usually breaks something.
- Send it as
Content-Security-Policy-Report-Onlyfirst. - Collect violation reports and remove or allow each source.
- Switch to
Content-Security-Policyonce the reports are clean.
Avoid *, 'unsafe-inline', and 'unsafe-eval' unless you accept the
tradeoff.
Set headers
Set headers with your framework, such as headers in next.config for
Next.js. For the headers Easel adds itself, see Headers.