class Marten::Conf::GlobalSettings::ContentSecurityPolicy
- Marten::Conf::GlobalSettings::ContentSecurityPolicy
- Reference
- Object
Overview
Allows to configure settings related to the Content-Security-Policy middleware.
Defined in:
marten/conf/global_settings/content_security_policy.crConstructors
Instance Method Summary
- #base_uri=(arg)
- #block_all_mixed_content=(arg)
- #child_src=(arg)
- #connect_src=(arg)
-
#default_policy : Marten::HTTP::ContentSecurityPolicy
Returns the default Content-Security-Policy.
-
#default_policy=(default_policy : Marten::HTTP::ContentSecurityPolicy)
Allows to set the default Content-Security-Policy.
- #default_src=(arg)
- #font_src=(arg)
- #form_action=(arg)
- #frame_ancestors=(arg)
- #frame_src=(arg)
- #img_src=(arg)
- #manifest_src=(arg)
- #media_src=(arg)
- #navigate_to=(arg)
-
#nonce_directives : Array(String)?
Returns an array of directives where a dynamically-generated nonce will be included.
-
#nonce_directives=(nonce_directives : Nil | Array(String))
Allows to set the array of directives where a dynamically-generated nonce will be included.
- #object_src=(arg)
- #plugin_types=(arg)
- #prefetch_src=(arg)
-
#report_only : Bool
Indicates whether policy violations are reported without enforcing it.
-
#report_only=(report_only : Bool)
Allows set whether to report violations of the policy without enforcing it.
-
#report_only? : Bool
Indicates whether policy violations are reported without enforcing it.
- #report_to=(arg)
- #report_uri=(arg)
- #require_sri_for=(arg)
- #sandbox=(arg)
- #script_src=(arg)
- #script_src_attr=(arg)
- #script_src_elem=(arg)
- #style_src=(arg)
- #style_src_attr=(arg)
- #style_src_elem=(arg)
- #upgrade_insecure_requests=(arg)
- #worker_src=(arg)
Constructor Detail
Instance Method Detail
Returns the default Content-Security-Policy.
Allows to set the default Content-Security-Policy.
Returns an array of directives where a dynamically-generated nonce will be included.
For example, if this setting is set to ["script-src"]
, a nonce-<b64-value>
value will be added to the
script-src
directive.
Allows to set the array of directives where a dynamically-generated nonce will be included.
Allows set whether to report violations of the policy without enforcing it.