混合内容错误-通过HTTPS提供服务时,swagger-ui应首选HTTPS API协议

时间:2019-06-14 13:33:45

标签: swagger-ui swagger-3.0

在打开ui链接时,我在控制台中看到错误>

Mixed Content: The page at 'https://***url***/api/documentation/ui' was loaded over HTTPS, but requested an insecure favicon 'http://***url***/swagger-ui-assets/favicon-16x16.png?v=47568366ac424fb77af3e26dce55c7cd'. This request has been blocked; the content must be served over HTTPS.

所有资产等等

我已经修改了我们正在生成文档的API文档json文件。 这部分并将http更改为https

"components": {
        "securitySchemes": {
            "bearer": {
                "type": "http",
                "description": "Passport security.",
                "scheme": "bearer",
                "bearerFormat": "JWT"
            }
        }
    }

我希望看到错误的用户界面时不会收到此错误

0 个答案:

没有答案