package content_security_policy

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val empty : t

The empty policy. This policy is equivalent to the following:

base-uri 'self'; form-action 'self'; frame-ancestors 'self'; block-all-mixed-content; default-src 'self';

val combine : t -> t -> t

combine merges the two policies, producing a policy that accepts the set of requests that is the union of both inputs.

val (|.|) : t -> t -> t

An operator alias for combine.

val reduce : t list -> t

reduce merges all the items in the list

val finalize : t -> t

returns a Csp.t for use in our various web-server libraries.

Constructors

val report_uri : string -> t
val base_uri : string -> t
val form_action : string -> t
val frame_ancestor : string -> t
val insecure_requests : [ `Allow | `Block | `Upgrade ] -> t
val fetch : Fetch_type.t -> Source.t -> t
OCaml

Innovation. Community. Security.