def dist(a, b):
    return sum((i-j)**2 for i, j in zip(a, b))
def after_request(response):
    response.headers.add('X-Test', 'This is only test.')
    response.headers.add('Access-Control-Allow-Origin', '*')  # TODO: set to real origin
    return response