SQLAlchemy engine configuration is not passed to FAB based UI. Faced this issue when running Airflow with MySQL metadata store with wait_timeout = 120. Webserver is failing with Internal Server Error due to "[MySQL Server has gone away](https://docs.sqlalchemy.org/en/13/faq/connections.html#mysql-server-has-gone-away)" error. Settings like `sql_alchemy_pool_recycle` and  `sql_alchemy_pool_pre_ping` have no impact on FAB internal communication with MySQL.

**Apache Airflow version**: 1.10.12
tests/www/test_app.py
app = application.cached_app(testing=True)
        app.url_map.add(Rule("/debug", endpoint="debug"))
        def debug_view():
            from flask import request
            
            self.assertEqual(request.remote_addr, '192.168.0.1')
            
            
            self.assertEqual(request.url, 'https://valid:445/proxy-prefix/debug')
            return Response("success")
        app.view_functions['debug'] = debug_view
        new_environ = {
            "PATH_INFO": "/debug",
            "REMOTE_ADDR": "192.168.0.2",
            "HTTP_HOST": "invalid:9000",
            "HTTP_X_FORWARDED_FOR": "192.168.0.1",
            "HTTP_X_FORWARDED_PROTO": "https",
            "HTTP_X_FORWARDED_HOST": "valid",
            "HTTP_X_FORWARDED_PORT": "445",
            "HTTP_X_FORWARDED_PREFIX": "/proxy-prefix",
        }
        environ = create_environ(environ_overrides=new_environ)
        response = Response.from_app(app, environ)
        self.assertEqual(b"success", response.get_data())
        self.assertEqual(response.status_code, 200)
    @conf_vars({
        ('webserver', 'base_url'): 'http://localhost:8080/internal-client',
    })
    @mock.patch("airflow.www.app.app", None)
    def test_should_respect_base_url_ignore_proxy_headers(self):