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

Allow host injection to be disabled #40

Closed 4D1L closed 11 months ago

4D1L commented 11 months ago

There is logic that adds host to the specification that is served by the library. This is problematic for us when the API is behind a load balancer and then a proxy which the library resolves host to node1.

This PR allows this logic to be disabled by passing an additional keyword arg called host_inject.

We would appreciate it if you could bump the version and publish to PyPI too.