Skip to content
Snippets Groups Projects
Unverified Commit 3ee8eb11 authored by Connor Shea's avatar Connor Shea
Browse files

Only report to Sentry when it's enabled.

parent 2e9bf6a7
No related branches found
No related tags found
No related merge requests found
require 'gitlab/current_settings'
include Gitlab::CurrentSettings
 
uri = URI.parse(current_application_settings.sentry_dsn)
CSP_REPORT_URI = "#{uri.scheme}://#{uri.host}/api#{uri.path}/csp-report/?sentry_key=#{uri.user}"
if Rails.env.production? && current_application_settings.sentry_enabled
uri = URI.parse(current_application_settings.sentry_dsn)
CSP_REPORT_URI = "#{uri.scheme}://#{uri.host}/api#{uri.path}/csp-report/?sentry_key=#{uri.user}"
else
CSP_REPORT_URI = ''
end
 
SecureHeaders::Configuration.default do |config|
config.cookies = {
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment