How can I configure "HTTPS" schemes with the drf-yasg auto-generated swagger page?
There is a solution.
When defining get_schema_view() in urls.py
, use this code:
schema_view = get_schema_view(
openapi.Info( ... ),
url='https://example.net/api/v1/', # Important bit
public=True,
permission_classes=(permissions.AllowAny,)
)
Note: You can either use https or http because of that better use this solution with an environment variable for different setups.