feat: add support for CSP (#72)

This commit adds support for running with CSP. CSP can be enabled
on a per page basis. If this is done, fresh will set a default CSP that
is very restrictive. Users can modify the CSP with the `useCSP` hook.
Fresh will add its own script resources to the CSP automatically.
This commit is contained in:
Luca Casonato
2021-11-01 12:58:13 +01:00
committed by GitHub
parent 95289380f3
commit 44a0d490fe
7 changed files with 276 additions and 28 deletions
+1
View File
@@ -28,6 +28,7 @@ export interface Page {
component?: ComponentType<PageProps>;
handler: Handler | Handlers;
runtimeJS: boolean;
csp: boolean;
}
export interface RendererModule {