

def loadCors(app):
    '\n    Load support for CORS Cross Origin Resource Sharing\n    '
    corsRoutes = ['/login', '/logout', '/signature', '/signature/<token>', '/run', 'run/<token>', '/event/<token>', '/fire', '/fire/<token>']

    @app.hook('after_request')
    def enableCors():
        "\n        Add CORS headers to each response\n        Don't use the wildcard '*' for Access-Control-Allow-Origin in production.\n        "
        bottle.response.set_header('Access-Control-Max-Age:', '3600')
        bottle.response.set_header('Access-Control-Allow-Origin', '*')
        bottle.response.set_header('Access-Control-Allow-Methods', 'PUT, GET, POST, DELETE, OPTIONS')
        bottle.response.set_header('Access-Control-Allow-Headers', 'Origin, Accept, Content-Type, X-Requested-With, X-CSRF-Token, X-Auth-Token')

    @app.route(corsRoutes, method='OPTIONS')
    def allowOption(path=None):
        '\n        Respond to OPTION request method\n        '
        return {
            
        }
    return corsRoutes

dataset/ETHPy150Open saltstack/halite/halite/server_bottle.py loadCors/VarMisuse@130/345 `app`->`corsRoutes`