<commit_before>class MainController < ApplicationController

  def index

  end

  def poligraft
    if (@result = Result.create!( :source_url => params[:url],
                                  :source_text => params[:text],
                                  :suppress_text => params[:suppresstext]))<commit_msg>Return an empty 200 if OPTIONS verb is sent.<commit_after>class MainController < ApplicationController

  def index

  end

  def poligraft
    if request.method == "OPTIONS"
      headers["Access-Control-Allow-Origin"] = "*"
      headers['Access-Control-Allow-Methods'] = '*'
      headers['Access-Control-Allow-Headers'] = '*'
      headers['Access-Control-Max-Age'] = '172800'
      render :nothing => true
      return
    end

    if (@result = Result.create!( :source_url => params[:url],
                                  :source_text => params[:text],
                                  :suppress_text => params[:suppresstext]))
{'fraction_non_alphanumeric': 0.12236286919831224, 'fraction_numerical': 0.00949367088607595, 'mean_word_length': 2.206081081081081, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '649862', 'n_tokens_mistral': 267, 'n_tokens_neox': 243, 'n_words': 54}