Class: Lotus::Config::Security

Inherits:
Object
  • Object
show all
Defined in:
lib/lotus/config/security.rb

Overview

Security policies are stored here.

Since:

  • 0.3.0

Constant Summary collapse

X_FRAME_OPTIONS_HEADER =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

See Also:

  • Loader#_configure_controller_framework!

Since:

  • 0.3.0

'X-Frame-Options'.freeze
CONTENT_SECURITY_POLICY_HEADER =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

See Also:

  • Loader#_configure_controller_framework!

Since:

  • 0.3.0

'Content-Security-Policy'.freeze

Instance Method Summary collapse

Instance Method Details

#content_security_policy(value) ⇒ Object #content_security_policyString

Content-Policy-Security headers’ value

Overloads:

  • #content_security_policy(value) ⇒ Object

    Sets the given value

    Parameters:

    • value (String)

      for Content-Security-Policy header.

  • #content_security_policyString

    Gets the value

    Returns:

    • (String)

      Content-Security-Policy header’s value

Since:

  • 0.3.0



49
50
51
52
53
54
55
# File 'lib/lotus/config/security.rb', line 49

def content_security_policy(value = nil)
  if value.nil?
    @content_security_policy
  else
    @content_security_policy = value
  end
end

#x_frame_options(value) ⇒ Object #x_frame_optionsString

X-Frame-Options headers’ value

Overloads:

  • #x_frame_options(value) ⇒ Object

    Sets the given value

    Parameters:

    • value (String)

      for X-Frame-Options header.

  • #x_frame_optionsString

    Gets the value

    Returns:

    • (String)

      X-Frame-Options header’s value

Since:

  • 0.3.0



30
31
32
33
34
35
36
# File 'lib/lotus/config/security.rb', line 30

def x_frame_options(value = nil)
  if value.nil?
    @x_frame_options
  else
    @x_frame_options = value
  end
end