<commit_before>'''
Created on 25.11.2014

@author: <NAME>
'''
from asl.application.service_application import service_application
from flask import Response
from flask.helpers import make_response
from functools import wraps

conf = service_application.config

def append_origin(response):
    if conf.get('ALLOW_ORIGIN'):
        response.headers['Access-Control-Allow-Origin'] = conf.get('ALLOW_ORIGIN')
    response.headers['Access-Control-Allow-Methods'] = 'POST, GET, OPTIONS'
    response.headers['Access-Control-Allow-Headers'] = 'accept, origin, content-type'

def append_asl(response):
    response.headers['ASL-Flask-Layer'] = service_application.get_version()

def append_cache(response):
    response.headers['Cache-Control'] = 'no-cache'

def append_all(response):
    append_asl(response)
    append_cache(response)<commit_msg>potrebujeme aj PUT.<commit_after>'''
Created on 25.11.2014

@author: <NAME>
'''
from asl.application.service_application import service_application
from flask import Response
from flask.helpers import make_response
from functools import wraps

conf = service_application.config

def append_origin(response):
    if conf.get('ALLOW_ORIGIN'):
        response.headers['Access-Control-Allow-Origin'] = conf.get('ALLOW_ORIGIN')
    response.headers['Access-Control-Allow-Methods'] = 'POST, GET, OPTIONS, PUT'
    response.headers['Access-Control-Allow-Headers'] = 'accept, origin, content-type'

def append_asl(response):
    response.headers['ASL-Flask-Layer'] = service_application.get_version()

def append_cache(response):
    response.headers['Cache-Control'] = 'no-cache'

def append_all(response):
    append_asl(response)
    append_cache(response)
{'fraction_non_alphanumeric': 0.12404016538688718, 'fraction_numerical': 0.009450679267572357, 'mean_word_length': 5.591439688715953, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1685618', 'n_tokens_mistral': 532, 'n_tokens_neox': 513, 'n_words': 102}