<commit_before>if defined?(SecureHeaders)
  SecureHeaders::Configuration.default do |config|
    config.hsts = "max-age=#{20.years.to_i}"
    config.x_frame_options = 'SAMEORIGIN'
    config.x_content_type_options = "nosniff"
    config.x_xss_protection = "1; mode=block"
    config.csp = {
      :report_only => false,
      :default_src => ["'self'"],
      :frame_src   => ["'self'"],
      :connect_src => ["'self'"],
      :style_src   => ["'unsafe-inline'", "'self'"],
      :script_src  => ["'unsafe-eval'", "'unsafe-inline'", "'self'"],
      :report_uri  => ["/dashboard/csp_report"]
    }
  end
end
<commit_msg>Fix csp fonts issue<commit_after>if defined?(SecureHeaders)
  SecureHeaders::Configuration.default do |config|
    config.hsts = "max-age=#{20.years.to_i}"
    config.x_frame_options = 'SAMEORIGIN'
    config.x_content_type_options = "nosniff"
    config.x_xss_protection = "1; mode=block"
    config.csp = {
      :report_only => false,
      :default_src => ["'self'"],
      :frame_src   => ["'self'"],
      :font_src    => ["'self'", 'https://fonts.gstatic.com'],
      :connect_src => ["'self'"],
      :style_src   => ["'unsafe-inline'", "'self'"],
      :script_src  => ["'unsafe-eval'", "'unsafe-inline'", "'self'"],
      :report_uri  => ["/dashboard/csp_report"]
    }
  end
end

{'fraction_non_alphanumeric': 0.19832189168573608, 'fraction_numerical': 0.004576659038901602, 'mean_word_length': 3.4175084175084174, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 18, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4538105', 'n_tokens_mistral': 485, 'n_tokens_neox': 481, 'n_words': 74}