def cursorAtSpaceEnd(block):
            cursor = QTextCursor(block)
            cursor.setPosition(block.position() + len(blockIndentation(block)))
            return cursor
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