class Marten::Conf::GlobalSettings::ContentSecurityPolicy

Overview

Allows to configure settings related to the Content-Security-Policy middleware.

Defined in:

marten/conf/global_settings/content_security_policy.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def base_uri=(arg) #

[View source]
def block_all_mixed_content=(arg) #

[View source]
def child_src=(arg) #

[View source]
def connect_src=(arg) #

[View source]
def default_policy : Marten::HTTP::ContentSecurityPolicy #

Returns the default Content-Security-Policy.


[View source]
def default_policy=(default_policy : Marten::HTTP::ContentSecurityPolicy) #

Allows to set the default Content-Security-Policy.


[View source]
def default_src=(arg) #

[View source]
def font_src=(arg) #

[View source]
def form_action=(arg) #

[View source]
def frame_ancestors=(arg) #

[View source]
def frame_src=(arg) #

[View source]
def img_src=(arg) #

[View source]
def manifest_src=(arg) #

[View source]
def media_src=(arg) #

[View source]
def navigate_to=(arg) #

[View source]
def nonce_directives : Array(String)? #

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.


[View source]
def nonce_directives=(nonce_directives : Nil | Array(String)) #

Allows to set the array of directives where a dynamically-generated nonce will be included.


[View source]
def object_src=(arg) #

[View source]
def plugin_types=(arg) #

[View source]
def prefetch_src=(arg) #

[View source]
def report_only : Bool #

Indicates whether policy violations are reported without enforcing it.


[View source]
def report_only=(report_only : Bool) #

Allows set whether to report violations of the policy without enforcing it.


[View source]
def report_only? : Bool #

Indicates whether policy violations are reported without enforcing it.


[View source]
def report_to=(arg) #

[View source]
def report_uri=(arg) #

[View source]
def require_sri_for=(arg) #

[View source]
def sandbox=(arg) #

[View source]
def script_src=(arg) #

[View source]
def script_src_attr=(arg) #

[View source]
def script_src_elem=(arg) #

[View source]
def style_src=(arg) #

[View source]
def style_src_attr=(arg) #

[View source]
def style_src_elem=(arg) #

[View source]
def upgrade_insecure_requests=(arg) #

[View source]
def worker_src=(arg) #

[View source]