CSP Header
Content-Security-Policy directives with source lists and boolean flags.
api
Install
$ npx shadcn@latest add @open-types/csp-header
Source
export interface CSPDirectives {
default_src?: string[];
script_src?: string[];
style_src?: string[];
img_src?: string[];
font_src?: string[];
connect_src?: string[];
media_src?: string[];
object_src?: string[];
frame_src?: string[];
child_src?: string[];
worker_src?: string[];
form_action?: string[];
frame_ancestors?: string[];
base_uri?: string[];
report_uri?: string[];
report_to?: string[];
upgrade_insecure_requests?: boolean;
block_all_mixed_content?: boolean;
}
export interface CSPDirectives {
default_src?: string[];
script_src?: string[];
style_src?: string[];
img_src?: string[];
font_src?: string[];
connect_src?: string[];
media_src?: string[];
object_src?: string[];
frame_src?: string[];
child_src?: string[];
worker_src?: string[];
form_action?: string[];
frame_ancestors?: string[];
base_uri?: string[];
report_uri?: string[];
report_to?: string[];
upgrade_insecure_requests?: boolean;
block_all_mixed_content?: boolean;
}