<commit_before># -*- coding: utf-8 -*-

"""
Main server factory.
We create all the components here!
"""

from __future__ import division, absolute_import
from . import myself, lic
from commons.logs import get_logger
from flask_cors import CORS

__author__ = myself
__copyright__ = myself
__license__ = lic

logger = get_logger(__name__)


# ####################################
# Allow cross-domain requests
# e.g. for JS and Upload

cors = CORS(
    headers=['Content-Type'],
    methods=['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'])
logger.debug("Flask: creating CORS")

# # WARNING: in case 'cors' write too much, you could fix it like this
# import logging
# corslogger = logging.getLogger('.server.cors')
# corslogger.setLevel(logging.WARNING)
<commit_msg>Added allowed headers in cors configuration<commit_after># -*- coding: utf-8 -*-

"""
Main server factory.
We create all the components here!
"""

from __future__ import division, absolute_import
from . import myself, lic
from commons.logs import get_logger
from flask_cors import CORS

__author__ = myself
__copyright__ = myself
__license__ = lic

logger = get_logger(__name__)


# ####################################
# Allow cross-domain requests
# e.g. for JS and Upload

cors = CORS(
    allow_headers=['Content-Type', 'Authorization', 'X-Requested-With'],
    methods=['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'OPTIONS'])
logger.debug("Flask: creating CORS")

# # WARNING: in case 'cors' write too much, you could fix it like this
# import logging
# corslogger = logging.getLogger('.server.cors')
# corslogger.setLevel(logging.WARNING)

{'fraction_non_alphanumeric': 0.16511483550589695, 'fraction_numerical': 0.0012414649286157666, 'mean_word_length': 5.014925373134329, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '179511', 'n_tokens_mistral': 496, 'n_tokens_neox': 490, 'n_words': 157}