<commit_before>if defined?(SecureHeaders)
  ::SecureHeaders::Configuration.configure do |config|
    config.hsts = { max_age: 20.years.to_i, include_subdomains: true }
    config.x_frame_options = 'DENY'
    config.x_content_type_options = 'nosniff'
    config.x_xss_protection = { value: 1, mode: 'block' }
    config.x_download_options = 'noopen'
    config.x_permitted_cross_domain_policies = 'none'
    config.csp = {
      default_src: 'https: self',
      font_src: 'self http://fonts.gstatic.com',
      frame_src: 'https: https://*.facebook.com',
      img_src: 'https: http: data:',
      report_uri: '/report_uri',
      script_src: 'eval inline http://*.googleapis.com http://maps.gstatic.com https://*.googleapis.com https://maps.gstatic.com self',
      style_src: 'inline http://fonts.googleapis.com http://netdna.bootstrapcdn.com https://fonts.googleapis.com https://netdna.bootstrapcdn.com self'
    }
  end
end<commit_msg>Temporary disabled csp until we have a proper report_uri route<commit_after>if defined?(SecureHeaders)
  ::SecureHeaders::Configuration.configure do |config|
    config.hsts = { max_age: 20.years.to_i, include_subdomains: true }
    config.x_frame_options = 'DENY'
    config.x_content_type_options = 'nosniff'
    config.x_xss_protection = { value: 1, mode: 'block' }
    config.x_download_options = 'noopen'
    config.x_permitted_cross_domain_policies = 'none'
    config.csp = false
    #config.csp = {
    #  default_src: 'self https:',
    #  font_src: 'self http://fonts.gstatic.com',
    #  frame_src: 'https: https://*.facebook.com http://*.facebook.com',
    #  img_src: 'data: http: https:',
    #  report_uri: '/report_uri',
    #  script_src: 'self eval inline http://*.facebook.net http://*.googleapis.com http://maps.gstatic.com https://*.facebook.net https://*.googleapis.com https://maps.gstatic.com',
    #  style_src: 'self inline http://fonts.googleapis.com http://netdna.bootstrapcdn.com https://fonts.googleapis.com https://netdna.bootstrapcdn.com'
    #}
  end
end
{'fraction_non_alphanumeric': 0.14955577492596248, 'fraction_numerical': 0.0029615004935834156, 'mean_word_length': 3.747072599531616, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 11, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6596966', 'n_tokens_mistral': 708, 'n_tokens_neox': 679, 'n_words': 125}