Class: ContentSecurityPolicyController

Inherits:
ActionController::Base show all
Defined in:
app/controllers/content_security_policy_controller.rb

Constant Summary collapse

CA_FILE =
File.expand_path(File.join('..','..', '..', 'config', 'curl-ca-bundle.crt'), __FILE__)

Constants included from SecureHeaders

SecureHeaders::VERSION

Instance Method Summary collapse

Methods included from SecureHeaders

append_features

Instance Method Details

#scribeObject



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/controllers/content_security_policy_controller.rb', line 7

def scribe
  csp = ::SecureHeaders::Configuration.csp || {}

  forward_endpoint = csp[:forward_endpoint]
  if forward_endpoint
    forward_params_to(forward_endpoint)
  end

  head :ok
rescue StandardError => e
  log_warning(forward_endpoint, e)
  head :bad_request
end