def __init__(self, app):
        self.app = app

        if 'BLUEOX_HOST' in app.config:
            self.blueox_host = app.config['BLUEOX_HOST']
            if self.blueox_host:
                blueox.default_configure(self.blueox_host)
        else:
            blueox.default_configure()

        self.app.before_request(self.before_request)
        self.app.after_request(self.after_request)

        got_request_exception.connect(self.handle_exception, self.app)
dataset/ETHPy150Open rhettg/BlueOx/blueox/contrib/flask/__init__.py/BlueOxMiddleware.__init__/original