Swagger UI 正在将请求中的协议从 https 更改为 http
Swagger UI is changing the protocol in the request from https to http
在 swaggerUI 中它默认采用 'http' 但实际的 API 将支持 'https'
一种可能的方法是, 将删除架构中的 'http',但在本地无法测试 'https'
那么这个问题的可能解决方案是什么?
哪位有想法的帮我看看...
从 github 中的 open issue of swagger-api/swagger-ui 可以明显看出,如果您要在本地主机中使用 https,请使用 openssl 制作自签名证书并让浏览器信任您的自签名证书。
解释了如何为 Apache 获取自签名证书here。
把它放在你的文档里
schemes:
- "https"
- "http"
你会得到 select 提供的方案
在 swaggerUI 中它默认采用 'http' 但实际的 API 将支持 'https' 一种可能的方法是, 将删除架构中的 'http',但在本地无法测试 'https' 那么这个问题的可能解决方案是什么?
哪位有想法的帮我看看...
从 github 中的 open issue of swagger-api/swagger-ui 可以明显看出,如果您要在本地主机中使用 https,请使用 openssl 制作自签名证书并让浏览器信任您的自签名证书。
解释了如何为 Apache 获取自签名证书here。
把它放在你的文档里
schemes:
- "https"
- "http"
你会得到 select 提供的方案