Module: SecureHeaders::Configuration
- Defined in:
- lib/secure_headers.rb
Class Attribute Summary collapse
-
.csp ⇒ Object
Returns the value of attribute csp.
-
.hpkp ⇒ Object
Returns the value of attribute hpkp.
-
.hsts ⇒ Object
Returns the value of attribute hsts.
-
.script_hashes ⇒ Object
Returns the value of attribute script_hashes.
-
.x_content_type_options ⇒ Object
Returns the value of attribute x_content_type_options.
-
.x_download_options ⇒ Object
Returns the value of attribute x_download_options.
-
.x_frame_options ⇒ Object
Returns the value of attribute x_frame_options.
-
.x_permitted_cross_domain_policies ⇒ Object
Returns the value of attribute x_permitted_cross_domain_policies.
-
.x_xss_protection ⇒ Object
Returns the value of attribute x_xss_protection.
Class Method Summary collapse
Class Attribute Details
.csp ⇒ Object
Returns the value of attribute csp.
7 8 9 |
# File 'lib/secure_headers.rb', line 7 def csp @csp end |
.hpkp ⇒ Object
Returns the value of attribute hpkp.
7 8 9 |
# File 'lib/secure_headers.rb', line 7 def hpkp @hpkp end |
.hsts ⇒ Object
Returns the value of attribute hsts.
7 8 9 |
# File 'lib/secure_headers.rb', line 7 def hsts @hsts end |
.script_hashes ⇒ Object
Returns the value of attribute script_hashes.
7 8 9 |
# File 'lib/secure_headers.rb', line 7 def script_hashes @script_hashes end |
.x_content_type_options ⇒ Object
Returns the value of attribute x_content_type_options.
7 8 9 |
# File 'lib/secure_headers.rb', line 7 def end |
.x_download_options ⇒ Object
Returns the value of attribute x_download_options.
7 8 9 |
# File 'lib/secure_headers.rb', line 7 def end |
.x_frame_options ⇒ Object
Returns the value of attribute x_frame_options.
7 8 9 |
# File 'lib/secure_headers.rb', line 7 def end |
.x_permitted_cross_domain_policies ⇒ Object
Returns the value of attribute x_permitted_cross_domain_policies.
7 8 9 |
# File 'lib/secure_headers.rb', line 7 def x_permitted_cross_domain_policies @x_permitted_cross_domain_policies end |
.x_xss_protection ⇒ Object
Returns the value of attribute x_xss_protection.
7 8 9 |
# File 'lib/secure_headers.rb', line 7 def x_xss_protection @x_xss_protection end |
Class Method Details
.configure(&block) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/secure_headers.rb', line 11 def configure &block instance_eval &block if File.exists?(SCRIPT_HASH_CONFIG_FILE) ::SecureHeaders::Configuration.script_hashes = YAML.load(File.open(SCRIPT_HASH_CONFIG_FILE)) end end |