Reputation: 483
In the swaggerUI it's default takes the 'http' but the actual API will support the 'https' One possible way, will remove the 'http' in the schema, but in local unable to test the 'https' so what is the possible solution for this issue?
Anyone have idea pls help me to find it out...
Upvotes: 9
Views: 27686
Reputation: 711
Add this to your settings.py if you are using Django
SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
Upvotes: 2
Reputation: 1907
Just put it in your docs
schemes:
- "https"
- "http"
And you'll got select with provided schemes
Upvotes: 8
Reputation: 9044
As its evident from this open issue of swagger-api/swagger-ui in github, for you to use https in localhost, make a self signed certificate using openssl and make the browser trust your self signed certificate.
How to get self signed certificate for Apache is explained here.
Upvotes: 2