<commit_before>CspReport::Engine.routes.draw do
  # Careful, the destroy_all action needs to be defined BEFORE the resources
  # indeed the resources declaration add all the csp_reports/XXX routes to be 
  # the show XXX item action
  get '/csp_reports/destroy_all' #, controller: 'csp_reports#destroy_all'
  resources :csp_reports
end<commit_msg>limiting the incoming formats for the CSP report create API<commit_after>CspReport::Engine.routes.draw do
  # Careful, the destroy_all action needs to be defined BEFORE the resources
  # indeed the resources declaration add all the csp_reports/XXX routes to be 
  # the show XXX item action
  get '/csp_reports/destroy_all' #, controller: 'csp_reports#destroy_all'

  resources :csp_reports, except: [:create]
  resources :csp_reports, only: [:create], constraints: { format: /(json|xml)/ }
end
{'fraction_non_alphanumeric': 0.07966706302021404, 'fraction_numerical': 0.0, 'mean_word_length': 5.1911764705882355, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '1018425', 'n_tokens_mistral': 262, 'n_tokens_neox': 248, 'n_words': 89}