PWZER / swagger-ui-py

Swagger UI for Python web framework, such Tornado, Flask and Sanic. https://pwzer.github.io/swagger-ui-py/
https://pypi.org/project/swagger-ui-py
Apache License 2.0
68 stars 31 forks source link

Fixed Starlette handler #14

Closed sdvallejo closed 4 years ago

sdvallejo commented 4 years ago

Before this fix I was getting the error:

AttributeError: 'Request' object has no attribute 'host'

With this change the handler uses the documented method to get the client host: https://www.starlette.io/requests/#client-address