Search code examples
node.jsswaggerswagger-ui

Swagger UI is changing the protocol in the request from https to http


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...


Solution

  • 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.