fastapi driver support forward connect

This commit is contained in:
yanyongyu
2021-07-23 00:51:19 +08:00
parent 54a7e4808c
commit cf747f954c
5 changed files with 244 additions and 33 deletions

View File

@ -140,14 +140,15 @@ class Driver(ReverseDriver):
},
},
}
uvicorn.run(app or self.server_app,
host=host or str(self.config.host),
port=port or self.config.port,
reload=bool(app) and self.config.debug,
reload_dirs=self.quart_config.quart_reload_dirs or None,
debug=self.config.debug,
log_config=LOGGING_CONFIG,
**kwargs)
uvicorn.run(
app or self.server_app, # type: ignore
host=host or str(self.config.host),
port=port or self.config.port,
reload=bool(app) and self.config.debug,
reload_dirs=self.quart_config.quart_reload_dirs or None,
debug=self.config.debug,
log_config=LOGGING_CONFIG,
**kwargs)
async def _handle_http(self, adapter: str):
request: Request = _request