跳至内容 跳至搜索
方法
C

常量

NONCE = "action_dispatch.content_security_policy_nonce"
 
NONCE_DIRECTIVES = "action_dispatch.content_security_policy_nonce_directives"
 
NONCE_GENERATOR = "action_dispatch.content_security_policy_nonce_generator"
 
POLICY = "action_dispatch.content_security_policy"
 
POLICY_REPORT_ONLY = "action_dispatch.content_security_policy_report_only"
 

实例公共方法

content_security_policy()

# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 77
def content_security_policy
  get_header(POLICY)
end

content_security_policy=(policy)

# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 81
def content_security_policy=(policy)
  set_header(POLICY, policy)
end

content_security_policy_nonce()

# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 109
def content_security_policy_nonce
  if content_security_policy_nonce_generator
    if nonce = get_header(NONCE)
      nonce
    else
      set_header(NONCE, generate_content_security_policy_nonce)
    end
  end
end

content_security_policy_nonce_directives()

# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 101
def content_security_policy_nonce_directives
  get_header(NONCE_DIRECTIVES)
end

content_security_policy_nonce_directives=(generator)

# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 105
def content_security_policy_nonce_directives=(generator)
  set_header(NONCE_DIRECTIVES, generator)
end

content_security_policy_nonce_generator()

# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 93
def content_security_policy_nonce_generator
  get_header(NONCE_GENERATOR)
end

content_security_policy_nonce_generator=(generator)

# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 97
def content_security_policy_nonce_generator=(generator)
  set_header(NONCE_GENERATOR, generator)
end

content_security_policy_report_only()

# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 85
def content_security_policy_report_only
  get_header(POLICY_REPORT_ONLY)
end

content_security_policy_report_only=(value)

# File actionpack/lib/action_dispatch/http/content_security_policy.rb, line 89
def content_security_policy_report_only=(value)
  set_header(POLICY_REPORT_ONLY, value)
end